/* ============================================
   HOMEPAGE MAIN STYLES - Based on Design System
   ============================================ */

/* Color System */
:root {
    --primary-blue: #146EF5;
    --primary-blue-variant: #1a7fff;
    --secondary-blue: #0d5ad4;
    --dark-bg: #0a0a0a;
    --white: #FFFFFF;
    --white-80: rgba(255, 255, 255, 0.8);
    --white-75: rgba(255, 255, 255, 0.75);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-20: rgba(255, 255, 255, 0.2);
    --white-10: rgba(255, 255, 255, 0.1);
    --white-05: rgba(255, 255, 255, 0.05);
    --blue-40: rgba(20, 110, 245, 0.4);
    --blue-30: rgba(20, 110, 245, 0.3);
    --blue-20: rgba(20, 110, 245, 0.2);
    --blue-15: rgba(20, 110, 245, 0.15);
    --blue-10: rgba(20, 110, 245, 0.1);
    --blue-08: rgba(20, 110, 245, 0.08);
    --blue-03: rgba(20, 110, 245, 0.03);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background-color: var(--dark-bg);
    color: var(--white-70);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, var(--blue-15) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 80%, var(--blue-10) 0%, transparent 70%),
        radial-gradient(ellipse at 40% 20%, var(--blue-08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: gradientShift 15s ease infinite;
}

/* Grid Background */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(20, 110, 245, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 110, 245, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, transparent 0%, black 100%);
}

/* Keyframe Animations */
@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(5%, 5%) rotate(120deg); }
    66% { transform: translate(-5%, 5%) rotate(240deg); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

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

@keyframes pulse {
    0% { box-shadow: 0 4px 15px var(--blue-40), 0 0 0 0 var(--blue-40); }
    50% { box-shadow: 0 4px 15px var(--blue-40), 0 0 0 10px rgba(20, 110, 245, 0); }
    100% { box-shadow: 0 4px 15px var(--blue-40), 0 0 0 0 rgba(20, 110, 245, 0); }
}

/* Floating Shapes */
.floating-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    z-index: 2;
    pointer-events: none;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -10%;
    right: -10%;
    background: radial-gradient(circle, var(--blue-40) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: -5%;
    left: -5%;
    background: radial-gradient(circle, var(--blue-30) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite 7s;
}

/* ============================================
   HEADER STYLES
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--blue-20);
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    cursor: pointer;
    transition: color 0.3s ease;
    text-decoration: none;
}

.logo-text:hover {
    color: var(--primary-blue);
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn {
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px var(--blue-40), 0 0 0 0 var(--blue-40);
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px var(--blue-40), 0 0 0 0 rgba(20, 110, 245, 0);
    transform: translateY(-3px);
    animation: none;
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 2px solid var(--white-20);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    border-color: var(--blue-40);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px var(--blue-20);
    transform: translateY(-3px);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

.nav-logout-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
}

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

.hero-section {
    width: 100%;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--blue-10) 0%, var(--blue-03) 100%);
    border-bottom: 1px solid var(--blue-20);
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-shadow: 0 2px 40px var(--blue-30);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--white-80);
    margin: 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    min-height: calc(100vh - 80px - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    z-index: 10;
}

.main-content-guide {
    align-items: flex-start;
    padding-top: 40px;
}

.welcome-section {
    width: 100%;
    max-width: 900px;
    animation: fadeInUp 1s ease-out;
}

.welcome-content {
    text-align: center;
}

.welcome-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 24px;
    text-shadow: 0 2px 40px var(--blue-30);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.welcome-content > p {
    font-size: 1.25rem;
    color: var(--white-80);
    margin-bottom: 16px;
}

.session-info {
    background: var(--white-05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--blue-20);
    border-radius: 12px;
    padding: 32px 24px;
    margin-top: 48px;
    text-align: center;
}

.session-info h2 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.session-info p {
    font-size: 0.95rem;
    color: var(--white-75);
    margin-bottom: 12px;
}

.session-info p:last-child {
    margin-bottom: 0;
}

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

.footer {
    background: rgba(10, 10, 10, 0.8);
    border-top: 1px solid var(--blue-20);
    color: var(--white-70);
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
    font-size: 0.9rem;
}

.footer p {
    margin: 0;
}

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

/* Tablet (≥ 768px) */
@media (min-width: 768px) {
    body {
        font-size: 17px;
    }

    .header {
        padding: 1.2rem 2rem;
    }

    .welcome-content h1 {
        font-size: 2.75rem;
    }

    .shape-1,
    .shape-2 {
        display: none;
    }
}

/* Desktop (≥ 1024px) */
@media (min-width: 1024px) {
    body {
        font-size: 18px;
    }

    .welcome-content h1 {
        font-size: 3.5rem;
    }

    .shape-1,
    .shape-2 {
        display: block;
    }
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {
    body {
        font-size: 16px;
    }

    .header {
        padding: 0.75rem 1rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-logout-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .main-content {
        min-height: calc(100vh - 60px - 150px);
        padding: 40px 16px;
    }

    .welcome-content h1 {
        font-size: 1.75rem;
    }

    .welcome-content > p {
        font-size: 0.95rem;
    }

    .session-info {
        padding: 24px 16px;
    }

    .session-info h2 {
        font-size: 1.1rem;
    }

    .session-info p {
        font-size: 0.85rem;
    }

    .footer {
        padding: 32px 16px;
        font-size: 0.85rem;
    }
}

/* ============================================
   ACCESSIBILITY & MOTION PREFERENCES
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    body::before,
    .floating-shape,
    .btn-primary {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: more) {
    .session-info {
        border: 2px solid var(--primary-blue);
    }

    .btn-secondary {
        border: 2px solid var(--white);
    }
}

/* Dark mode support (system preference) */
@media (prefers-color-scheme: dark) {
    /* Already dark by default */
}

/* ============================================
   GUIDE SECTION STYLES (Senior-Friendly)
   ============================================ */

.guide-section {
    width: 100%;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
}

.guide-container {
    max-width: 900px;
    width: 100%;
    padding: 40px 20px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-blue-variant) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 20%;
}

.progress-text {
    text-align: center;
    font-size: 0.95rem;
    color: var(--white);
    margin-bottom: 32px;
    font-weight: 500;
}

/* Step Block Styling */
.step-block {
    display: none;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.step-block.active {
    display: flex;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px var(--blue-40);
    margin: 0 auto 16px auto;
}

.step-content {
    flex: 1;
}

.step-content h2 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 12px;
    font-weight: 700;
}

.step-description {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.6;
}

.install-steps {
    font-size: 1.05rem;
    color: var(--white);
    line-height: 1.8;
    margin-left: 24px;
    margin-top: 12px;
}

.install-steps li {
    margin-bottom: 10px;
    color: var(--white);
}

.install-steps strong {
    color: var(--white);
    font-weight: 600;
}

/* Button Large Variant */
.btn-large {
    padding: 20px 48px !important;
    font-size: 1.1rem !important;
    display: inline-block;
    margin: 16px 0;
}

/* Help Details Section */
.help-details {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.help-details summary {
    color: var(--primary-blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.help-details summary:hover {
    color: var(--primary-blue-variant);
}

.help-details p {
    margin-top: 12px;
    color: var(--white);
    font-size: 0.95rem;
}

/* Info Box */
.info-box {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 4px solid var(--primary-blue);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease-out;
}

.info-box p {
    color: var(--white);
    font-size: 1.05rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.highlight-list {
    list-style: none;
    margin: 16px 0 0 0;
    padding: 0;
}

.highlight-list li {
    padding: 12px 0;
    font-size: 1.05rem;
    color: var(--white);
    border-bottom: 1px solid var(--blue-15);
    line-height: 1.6;
}

.highlight-list li:last-child {
    border-bottom: none;
}

.highlight-list strong {
    color: var(--white);
    font-weight: 600;
}

/* Contact Box */
.contact-box {
    background: transparent;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-box p {
    font-size: 1.1rem;
    color: var(--white);
    margin: 12px 0;
    line-height: 1.6;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

.contact-box a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-box a:hover {
    color: var(--primary-blue-variant);
    text-decoration: underline;
}

/* Important Box */
.important-box {
    background: transparent;
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-left: 4px solid #FFC107;
    border-radius: 8px;
    padding: 24px;
    margin: 40px 0;
    animation: fadeInUp 0.6s ease-out;
}

.important-box h2 {
    font-size: 1.3rem;
    color: #FFD54F;
    margin-bottom: 16px;
    font-weight: 700;
}

.important-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.important-box li {
    font-size: 1.05rem;
    color: var(--white);
    margin: 12px 0;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.important-box li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #FFC107;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 40px;
    margin-bottom: 40px;
}

.navigation-buttons .btn {
    flex: 1;
    text-align: center;
    padding: 18px 32px !important;
    font-size: 1.05rem !important;
    font-weight: 600;
}

.navigation-buttons #prevBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.navigation-buttons #nextBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Support Section */
.support-section {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    margin-top: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.6s ease-out;
}

.support-section h2 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 16px;
    font-weight: 700;
}

.support-section p {
    font-size: 1.1rem;
    color: var(--white-80);
    margin-bottom: 24px;
    line-height: 1.6;
}

.support-section .btn {
    margin: 0 12px 12px 0;
}

/* ============================================
   RESPONSIVE DESIGN FOR GUIDES
   ============================================ */

@media (max-width: 768px) {
    .step-block {
        flex-direction: column;
        gap: 16px;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    .rustdesk-layout {
        flex-direction: column !important;
    }

    .step-content h2 {
        font-size: 1.3rem;
    }

    .step-description {
        font-size: 1rem;
    }

    .install-steps {
        font-size: 1rem;
    }

    .btn-large {
        padding: 16px 32px !important;
        font-size: 1rem !important;
        width: 100%;
    }

    .info-box {
        padding: 16px;
    }

    .contact-box {
        padding: 16px;
    }

    .important-box {
        padding: 20px;
    }

    .important-box h2 {
        font-size: 1.2rem;
    }

    .important-box li {
        font-size: 1rem;
    }

    .support-section {
        padding: 24px 16px;
    }

    .support-section h2 {
        font-size: 1.3rem;
    }

    .support-section p {
        font-size: 1rem;
    }

    .support-section .btn {
        display: block;
        margin-bottom: 12px;
        width: 100%;
    }

    .support-section .btn:last-child {
        margin-bottom: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .step-block {
        padding: 16px;
        margin-bottom: 24px;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .step-content h2 {
        font-size: 1.2rem;
    }

    .step-description {
        font-size: 0.95rem;
    }

    .install-steps {
        font-size: 0.95rem;
        margin-left: 16px;
    }

    .info-box p {
        font-size: 1rem;
    }

    .highlight-list li {
        font-size: 1rem;
    }

    .contact-box p {
        font-size: 1rem;
    }

    .important-box li {
        font-size: 0.95rem;
        padding-left: 20px;
    }
}
