/* Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0c0c0d;
    --secondary-color: #121314;
    --grey-text: #8e8e93;
    --error-color: #ff6b6b;
    --yellow: #3b82f6;
    --light-yellow: #478df7;
    --white: #ffffff;
    --accent: #3b82f6;
    --bg-dark: #0c0c0d;
    --panel-bg: #18191b;
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #e1e1e3;
    --text-dim: #9a9a9c;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    overflow-x: hidden;
    overflow-y: visible !important;
    height: auto !important;
    min-height: 100vh;
}

body {
    background-color: var(--bg-dark);
    line-height: 1.5;
    color: var(--text-main);
    padding-top: 60px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(12, 12, 13, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    overflow: visible;
}

.navbar .container {
    max-width: 1400px; /* Увеличено с 1200px до 1400px */
    width: 100%;
    margin: 0 auto;
    padding: 0 40px; /* Увеличено с 20px до 40px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar .logo .site-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    object-fit: cover;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
    padding: 2px;
    background: var(--bg-dark);
}

.navbar .logo .title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    overflow: visible;
}

.navbar .nav-links > li {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.navbar .nav-links > li > a,
.navbar .account-trigger {
    color: var(--grey-text);
    text-decoration: none;
    padding: 0 12px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px;
}

.navbar .nav-links > li:hover > a,
.navbar .account-menu:hover .account-trigger {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.navbar .dropdown {
    position: absolute;
    top: 55px;
    left: 0;
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top left;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 8px;
    z-index: 10001;
    pointer-events: none;
}

.navbar .account-menu .dropdown {
    right: 0;
    left: auto;
    transform-origin: top right;
}

.navbar li:hover > .dropdown,
.navbar .account-menu:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.navbar .dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--grey-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-radius: 6px;
}

.navbar .dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.navbar .dropdown i {
    width: 18px;
    text-align: center;
    color: var(--accent);
    font-size: 0.9rem;
}

.navbar .fa-chevron-down {
    font-size: 0.7rem;
    opacity: 0.5;
    transition: transform 0.3s ease;
}

.navbar li:hover .fa-chevron-down,
.navbar .account-menu:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* Account Area */
.auth-area {
    display: flex;
    align-items: center;
    height: 60px;
}

.account-menu {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Container */
.container {
    max-width: 1400px; /* Увеличено с 1100px до 1400px */
    margin: 0 auto;
    padding: 0 40px; /* Увеличено с 20px до 40px */
    width: 100%;
    box-sizing: border-box;
}

.container.full {
    max-width: 100%;
    padding: 0 40px; /* Увеличено с 20px до 40px */
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1440px) {
    .container {
        max-width: 1200px;
        padding: 0 30px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .container.full {
        padding: 0 20px;
    }
    
    .container {
        padding: 0 20px;
    }
}

/* Footer Styles */
.footer {
    background: var(--panel-bg);
    padding: 60px 0 0;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.5;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
    padding-bottom: 50px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
}

.footer-branding {
    flex: 0 0 auto;
    min-width: 200px;
    max-width: 280px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.footer-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid var(--accent);
    padding: 2px;
    background: var(--bg-dark);
    object-fit: cover;
}

.footer-logo-text {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.footer-description {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}


.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    flex: 0 0 auto;
    min-width: 280px;
    margin-left: auto;
}

.footer-group-title {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.footer-group ul {
    list-style: none;
}

.footer-group ul li {
    margin-bottom: 10px;
}

.footer-group ul li a {
    color: var(--grey-text);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.footer-group ul li a:hover {
    color: var(--accent);
}

.footer-group ul li a i {
    width: 16px;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.7;
    color: var(--accent);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.25);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

.footer-bottom .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.footer-bottom p {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 35px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .footer-branding {
        max-width: 100%;
    }
    
    .footer-links-grid {
        gap: 30px;
        width: 100%;
    }
    
    .footer-logo-img {
        width: 38px;
        height: 38px;
    }
    
    .footer-logo-text {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Button styles */
.btn, 
.button,
button,
input[type="submit"], 
input[type="button"],
.auth-btn,
.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background-color: var(--accent);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    gap: 8px;
    letter-spacing: -0.01em;
}

.btn:hover, 
.button:hover,
button:hover,
input[type="submit"]:hover, 
input[type="button"]:hover,
.auth-btn:hover,
.download-button:hover {
    background-color: var(--light-yellow);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    color: #fff !important;
}

.btn:active, 
button:active,
input[type="submit"]:active, 
.auth-btn:active {
    transform: translateY(0);
}

/* Form controls */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    margin: 8px 0;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s ease;
}

input:focus, 
textarea:focus, 
select:focus {
    outline: none;
    border-color: var(--accent);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Admin specific buttons */
.btn-danger, .admin-btn-delete {
    background-color: #ff4d4d !important;
    color: #fff !important;
}
.btn-danger:hover, .admin-btn-delete:hover {
    background-color: #ff3333 !important;
    box-shadow: 0 4px 15px rgba(255, 77, 77, 0.3) !important;
}

.btn-blurple, .admin-btn-save {
    background-color: #5865F2 !important;
    color: #fff !important;
}
.btn-blurple:hover, .admin-btn-save:hover {
    background-color: #4752C4 !important;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3) !important;
}

/* Animations */
.card, .features, .profile-container, .skills-container, .docs-section, .agreement-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

.card.visible, .features.visible, .profile-container.visible, .skills-container.visible, .docs-section.visible, .agreement-section.visible {
    opacity: 1;
    transform: none;
}

.btn, .button, .footer-group ul li a, .navbar a, .site-logo, .account-trigger {
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.btn:hover, .footer-group ul li a:hover, .navbar a:hover, .account-trigger:hover {
    transform: translateY(-2px);
}

/* Details Modal Styles */
.modal-large {
    max-width: 1800px;
    width: 98%;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.details-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s ease;
}

.details-section:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.details-section-title {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-section-title i {
    background: rgba(59, 130, 246, 0.15);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

.details-row:last-child {
    border-bottom: none;
}

.details-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.details-label {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 500;
}

.details-value {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
    max-width: 70%;
    word-break: break-word;
}

.details-value a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s ease;
}

.details-value a:hover {
    text-decoration: underline;
    color: var(--light-yellow);
}

.details-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.avatar-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.avatar-preview:hover {
    transform: scale(1.05);
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: var(--text-dim);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Full width for avatar section */
.details-section:has(.details-avatar) {
    grid-column: 1 / -1;
}

/* Details Modal Header */
.details-modal-header {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 24px !important;
}

.details-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.details-header-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.details-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    color: var(--accent);
    font-size: 1.5rem;
}

.details-header-email {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 4px;
}

.details-modal-header .modal-title {
    font-size: 1.25rem !important;
    margin-bottom: 0 !important;
}

/* API Badge */
.api-badge {
    background: linear-gradient(135deg, var(--accent) 0%, var(--light-yellow) 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    min-width: 28px;
    text-align: center;
}

/* Improved badges */
.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: none !important;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: none !important;
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: none !important;
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%) !important;
    color: var(--text-dim) !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-large {
        max-width: 95%;
        width: 95%;
    }
    
    .details-modal-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .details-header-info {
        width: 100%;
    }
}