/* ===== FONTS ===== */
@font-face {
    font-family: 'Onder';
    src: url('fonts/ONDER-REGULAR.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Bounded';
    src: url('fonts/Bounded-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.4);
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --blur: 24px;
    --radius: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Bounded', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== BACKGROUND ===== */
.profil-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('img/fon.png') center/cover no-repeat;
    z-index: -2;
    will-change: background-size;
    -webkit-will-change: background-size;
}

/* Mobile fix */
@media (max-width: 768px) {
    .profil-bg {
        background-attachment: scroll;
        background-size: 100% 100%;
        -webkit-background-size: 100% 100%;
        background-position: center center;
        min-height: 100vh;
    }
}

.profil-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.profil-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.88) 0%, rgba(10, 10, 10, 0.96) 100%);
    z-index: 1;
}

/* ===== HEADER ===== */
.profil-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 16px 32px;
    background: transparent;
}

.profil-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Onder', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    padding: 4px 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 999px;
}

.profil-logo-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.btn-logout {
    font-family: 'Bounded', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 20px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

/* ===== LAYOUT ===== */
.profil-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    gap: 24px;
    padding: 100px 48px 48px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

/* ===== SIDEBAR ===== */
.profil-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-card {
    padding: 32px 24px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-buttons-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 769px) {
    .sidebar-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .sidebar-buttons-top {
        flex: 1;
    }
    .sidebar-buttons .support-btn {
        width: 100%;
        margin-top: 40px;
    }
}

.sidebar-sticky {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-card h3 {
    font-family: 'Onder', sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: center;
}

.client-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.client-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-login {
    font-size: 13px;
    color: var(--text-secondary);
}

.sidebar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 0;
    color: var(--text-muted);
}

.sidebar-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

.sidebar-placeholder p {
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}

/* ===== MAIN ===== */
.profil-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== PROFILE CARD ===== */
.profil-card {
    padding: 40px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: cardAppear 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(16px);
}

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profil-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    pointer-events: none;
}

.profil-card {
    position: relative;
}

.profil-login {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.stats-card {
    text-align: center;
    padding: 48px 40px;
}

.stats-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 0;
    color: var(--text-muted);
}

.stats-placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}

.stats-placeholder p {
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}

.sub-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}
.sub-badge.pro {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}
.sub-badge.max {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    box-shadow: 0 4px 16px rgba(245,158,11,0.3);
}

.sub-expire {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== CREATE CARD ===== */
.create-card {
    text-align: center;
    padding: 48px 40px;
    animation-delay: 0.15s;
}

.create-card h2 {
    font-family: 'Onder', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.create-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-weight: 300;
}

.btn-create {
    display: inline-block;
    padding: 16px 32px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 12px;
    font-family: 'Bounded', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-create:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .profil-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        padding: 16px 24px !important;
    }

    .profil-container {
        flex-direction: column;
        padding: 100px 24px 24px;
    }

    .profil-sidebar {
        width: 100%;
    }

    .sidebar-card {
        position: static;
    }
}

.badge-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.site-footer {
    background: #000;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 40px 48px;
    margin-top: 120px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-copy {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-inn {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-link {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: rgba(255,255,255,0.8);
}

/* ===== CARDS BLOCK ===== */
    padding: 48px 40px;
    animation-delay: 0.15s;
}
.cards-card h2 {
    font-family: 'Onder', sans-serif;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.cards-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 300;
}
.empty-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 0;
    color: var(--text-muted);
}
.empty-cards svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}
.empty-cards p {
    font-size: 14px;
}
.cards-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}
.btn-add {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Bounded', sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.btn-add:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

/* ===== SITES LIST ===== */
.sites-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.site-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}
.site-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
}
.site-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.site-name {
    font-size: 16px;
    font-weight: 500;
}
.site-url {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
}
.site-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-site-view,
.btn-site-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Bounded', sans-serif;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-site-view {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}
.btn-site-view:hover {
    background: rgba(255,255,255,0.15);
}
.btn-site-edit {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}
.btn-site-edit:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
.btn-site-qr {
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-site-qr:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}
.btn-site-qr span {
    font-size: 12px;
}
.btn-site-delete {
    width: 36px;
    height: 36px;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 8px;
    color: #f87171;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-site-delete:hover {
    background: rgba(239,68,68,0.25);
}

.btn-site-delete-mobile {
    display: none;
}

/* ===== STATS PRO ===== */
.stats-pro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 0;
    color: var(--text-muted);
}
.stats-pro svg {
    width: 40px;
    height: 40px;
    opacity: 0.4;
}
.stats-pro p {
    font-size: 14px;
    text-align: center;
}
.btn-pro {
    padding: 12px 28px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 10px;
    font-family: 'Bounded', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}
.btn-pro:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.12);
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}
.modal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}
.modal-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}
.modal-actions {
    display: flex;
    gap: 12px;
}
.btn-modal-cancel {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: 'Bounded', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-modal-cancel:hover {
    background: rgba(255,255,255,0.1);
}
.btn-modal-delete {
    flex: 1;
    padding: 12px;
    background: rgba(239,68,68,0.2);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 10px;
    color: #f87171;
    font-family: 'Bounded', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-modal-delete:hover {
    background: rgba(239,68,68,0.3);
}

/* ===== HEADER LOGO LINK ===== */
.profil-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Onder', sans-serif;
    font-size: 8px;
    letter-spacing: 2px;
    padding: 4px 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
}
    .profil-header-logo:hover {
        background: rgba(255,255,255,0.9);
        transform: translateY(-2px);
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    html, body { max-width: 100% !important; overflow-x: hidden !important; }
    .profil-header {
        padding: 12px 16px;
        flex-direction: row !important;
        gap: 0;
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .profil-header-logo {
        padding: 4px 10px !important;
    }

    .profil-logo-icon {
        width: 28px !important;
        height: 28px !important;
    }

    .profil-header-logo span {
        font-size: 7px !important;
    }

    .btn-logout {
        font-size: 11px !important;
        padding: 8px 16px !important;
    }

    .profil-container {
        padding: 80px 12px 12px !important;
    }

    .profil-card {
        padding: 20px 16px !important;
    }

    .sidebar-card {
        padding: 20px 16px !important;
    }

    .sidebar-card h3 {
        font-size: 9px !important;
    }

    .client-login {
        font-size: 12px !important;
    }

    .sub-badge {
        font-size: 10px !important;
        padding: 4px 12px !important;
    }

    .sub-expire {
        font-size: 11px !important;
    }

    .cards-card {
        padding: 20px 16px !important;
    }

    .cards-header-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    .badge-row {
        display: flex !important;
        justify-content: flex-end !important;
        padding-bottom: 16px !important;
    }

    .card-creation-wrapper {
        padding-top: 20px !important;
    }

    .cards-card h2 {
        font-size: 14px !important;
        letter-spacing: 1.5px !important;
    }

    .cards-subtitle {
        font-size: 11px !important;
        margin-bottom: 0 !important;
        padding-bottom: 20px !important;
    }

    .badge-row {
        display: flex !important;
        justify-content: flex-end !important;
        padding-bottom: 16px !important;
    }

    .card-creation-wrapper {
        padding-top: 0 !important;
    }

    .sites-limit-badge {
        font-size: 10px !important;
        padding: 3px 8px !important;
    }

    .site-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 14px !important;
        position: relative !important;
        justify-content: flex-start !important;
    }

    .site-info {
        min-width: 0 !important;
        padding-right: 32px !important;
    }

    .site-name {
        font-size: 13px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .site-url {
        font-size: 10px !important;
    }

    .site-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        align-items: center !important;
        width: 100% !important;
    }

    .btn-site-view,
    .btn-site-edit {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 1 !important;
        padding: 8px 6px !important;
        font-size: 10px !important;
        text-align: center !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    .btn-site-qr {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 6px 10px !important;
        min-width: 60px !important;
    }
    .btn-site-qr span {
        font-size: 9px !important;
    }

    .btn-site-delete-mobile {
        display: block !important;
        position: absolute !important;
        top: 10px !important;
        right: 14px !important;
        width: 28px !important;
        height: 28px !important;
        background: rgba(239,68,68,0.15) !important;
        border: 1px solid rgba(239,68,68,0.3) !important;
        border-radius: 6px !important;
        color: #f87171 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        line-height: 1 !important;
    }

    .btn-site-delete {
        display: none !important;
    }

    .empty-cards p {
        font-size: 12px !important;
    }

    .stats-pro p {
        font-size: 12px !important;
    }

    .btn-pro {
        font-size: 11px !important;
        padding: 10px 20px !important;
    }

    .modal-content {
        padding: 24px 20px !important;
    }

    .modal-content h3 {
        font-size: 16px !important;
    }

    .cards-footer {
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
    }

    .btn-add {
        display: inline-block !important;
        width: auto !important;
    }

    .modal-content p {
        font-size: 12px !important;
    }

    .stats-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 8px !important;
    }

    .stat-card {
        padding: 12px 8px !important;
    }

    .stat-card-value {
        font-size: 18px !important;
    }

    .stat-card-label {
        font-size: 9px !important;
    }

    .stat-card-sub {
        font-size: 8px !important;
    }

    .stats-chart {
        padding: 16px !important;
    }

    .stats-chart-title {
        font-size: 12px !important;
    }

    .stats-chart-period {
        font-size: 9px !important;
    }

    .stats-site-badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }

    .stats-card-tab {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .stats-links {
        padding: 16px !important;
    }

    .stats-links-title {
        font-size: 12px !important;
    }

    .link-stat-card {
        min-width: 120px !important;
        padding: 12px !important;
    }

    .link-stat-title {
        font-size: 10px !important;
    }

    .link-stat-label,
    .link-stat-value {
        font-size: 9px !important;
    }

    .stats-accordion-toggle {
        font-size: 14px !important;
    }

    .site-footer {
        padding: 32px 20px !important;
        margin-top: 60px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .footer-container {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center;
        width: 100% !important;
        max-width: 100% !important;
    }

    .footer-left {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 12px !important;
    }

    .footer-right {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto !important;
        gap: 12px 8px !important;
    }

    .footer-right a:first-child {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }

    .footer-right a:nth-child(2) {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .footer-right a:nth-child(3) {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    .footer-link {
        font-size: 11px !important;
        word-break: break-word !important;
    }

    .footer-link {
        font-size: 11px !important;
    }

    .footer-copy {
        font-size: 12px !important;
    }

    .footer-inn {
        font-size: 11px !important;
    }
}
