/* ============================================
   XREG-MED - HI-TECH/SCI-FI Стиль
   ============================================ */

:root {
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --secondary-color: #7b2cbf;
    --accent-color: #ff006e;
    --bg-dark: #0a0e27;
    --bg-darker: #050811;
    --bg-light: #1a1f3a;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #6b7a8f;
    --border-color: #1f2d4a;
    --glow-color: rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 20px var(--glow-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-light) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-feature-settings: 'kern' 1, 'liga' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(123, 44, 191, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Убираем бэкграунд для личного кабинета */
body.dashboard-page::before {
    background: 
        radial-gradient(circle at 95% 5%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 98% 95%, rgba(123, 44, 191, 0.05) 0%, transparent 50%);
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.main-header {
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 20px;
    flex-wrap: nowrap;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--primary-color));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
    overflow: visible;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-item {
    position: relative;
    flex-shrink: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 31, 58, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    list-style: none;
    min-width: 250px;
    padding: 10px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    border-left-color: var(--primary-color);
    padding-left: 25px;
}

.auth-item {
    margin-left: 8px;
}

.auth-item .auth-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 20px;
    white-space: nowrap;
}

.auth-item .auth-link:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 30px;
    line-height: 1.2;
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow-color);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

.btn {
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.element-1 {
    width: 200px;
    height: 200px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.element-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
}

/* ============================================
   SERVICES & CARDS
   ============================================ */

.services-preview,
.features-section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 44, 191, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 212, 255, 0.3);
}

.service-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(0, 212, 255, 0.3));
}

.service-card:hover .service-icon {
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 8px 20px rgba(0, 212, 255, 0.5));
}

.service-card:hover .service-icon svg {
    filter: drop-shadow(0 6px 16px rgba(0, 212, 255, 0.6));
}

.service-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.service-link:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

/* ============================================
   FEATURES
   ============================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px;
    position: relative;
}

.feature-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 20px;
}

.feature-item h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-item p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ============================================
   CONTENT PAGES
   ============================================ */

.main-content {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.page-header {
    text-align: center;
    padding: 60px 0;
    background: rgba(26, 31, 58, 0.3);
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 42px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-content h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-size: 28px;
}

.page-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin: 30px 0 15px;
    font-size: 22px;
}

.page-content p {
    margin-bottom: 20px;
}

.page-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 10px;
}

/* ============================================
   FORMS
   ============================================ */

.form-container {
    max-width: 500px;
    margin: 60px auto;
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.form-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    background: rgba(10, 14, 39, 0.95);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.form-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
}

.form-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-link a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.alert-error {
    background: rgba(255, 0, 110, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ============================================
   DASHBOARD
   ============================================ */

.dashboard-container {
    max-width: 1800px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.dashboard-welcome {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.dashboard-card h3 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.user-info {
    color: var(--text-secondary);
    line-height: 1.8;
}

.user-info strong {
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */

.main-footer {
    background: rgba(5, 8, 17, 0.95);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

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

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

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 14, 39, 0.98);
        backdrop-filter: blur(10px);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        flex: none;
        justify-content: flex-start;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: 20px;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        width: 100%;
        padding: 15px;
        justify-content: space-between;
        font-size: 15px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        width: 100%;
        margin: 0;
        border: none;
        border-top: 1px solid var(--border-color);
        background: rgba(26, 31, 58, 0.8);
    }
    
    .nav-item.active .dropdown-menu {
        display: block;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .services-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .form-container {
        margin: 30px auto;
        padding: 30px 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
}
