/* CSS Variables for Theme Support */
:root {
    /* Light Theme */
    --bg-primary: #800080;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-tertiary: rgba(255, 255, 255, 0.7);
    --text-primary: #333;
    --text-secondary: #555;
    --text-accent: #800080;
    --text-light: #666;
    --border-color: #800080;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-accent: rgba(128, 0, 128, 0.3);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --card-bg: rgba(255, 255, 255, 0.9);
    --primary-color: #800080;
    --primary-hover: #6a006a;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #1a0d3a;
    --bg-secondary: rgba(30, 30, 30, 0.95);
    --bg-tertiary: rgba(40, 40, 40, 0.7);
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-accent: #e851e8;
    --text-light: #999;
    --border-color: #e851e8;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-accent: rgba(232, 81, 232, 0.2);
    --navbar-bg: rgba(30, 30, 30, 0.95);
    --card-bg: rgba(40, 40, 40, 0.9);
    --primary-color: #e851e8;
    --primary-hover: #d147d1;
}

/* Dark theme specific feature card styles */
[data-theme="dark"] .feature-card {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .feature-card h3 {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .feature-card p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.1);
}

.nav-logo h2 {
    color: var(--text-accent);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.tagline {
    font-size: 0.8rem;
    color: var(--border-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 15px var(--shadow-accent);
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-accent);
    border-radius: 2px;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    background: var(--bg-secondary);
    margin: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-color);
    backdrop-filter: blur(10px);
    min-height: calc(100vh - 140px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 20px 20px 0 0;
    margin-bottom: 2rem;
    transition: background 0.3s ease;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

.content {
    padding: 0 2rem 2rem;
}

/* Terms and Privacy Sections */
.terms-section,
.privacy-section,
.story-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-radius: 15px;
    border-left: 4px solid var(--border-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.terms-section h2,
.privacy-section h2,
.story-section h2 {
    color: var(--text-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.terms-section p,
.privacy-section p,
.story-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    transition: color 0.3s ease;
}

.terms-section ul,
.privacy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-section li,
.privacy-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.story-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.terms-section li,
.story-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.link {
    color: var(--border-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--text-accent);
}

/* Story Page Specific Styles */
.developer-photo {
    text-align: center;
    margin-bottom: 2rem;
}

.developer-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e851e8;
    box-shadow: 0 10px 30px rgba(232, 81, 232, 0.3);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px var(--shadow-accent);
    transition: transform 0.3s ease;
}

.feature-card h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.feature-card p {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.link-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-primary);
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.link-card:hover {
    border-color: var(--border-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-accent);
}

.link-card h3 {
    color: var(--text-accent);
    margin-bottom: 0.5rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.link-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Video Container */
.video-container {
    margin: 2rem 0;
    text-align: center;
}

.video-container h3 {
    color: var(--text-accent);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    background: var(--card-bg);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--navbar-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px var(--shadow-color);
        padding: 2rem 0;
        gap: 1rem;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .main-content {
        margin: 10px;
        border-radius: 15px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .content {
        padding: 0 1rem 1rem;
    }

    .terms-section,
    .privacy-section,
    .story-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .features-grid,
    .links-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .developer-img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }

    .nav-logo h2 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.7rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 2rem 0 1.5rem;
    }

    .terms-section h2,
    .privacy-section h2,
    .story-section h2 {
        font-size: 1.3rem;
    }

    .developer-img {
        width: 120px;
        height: 120px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
.nav-link:focus,
.link:focus,
.link-card:focus {
    outline: 2px solid #e851e8;
    outline-offset: 2px;
}

/* Loading animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-section,
.privacy-section,
.story-section {
    animation: fadeIn 0.6s ease-out;
}

/* Form Styles */
.support-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, .form-textarea {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px var(--shadow-accent);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-accent);
}

[data-theme="dark"] .form-input, [data-theme="dark"] .form-textarea {
    border-color: var(--bg-tertiary);
}
[data-theme="dark"] .form-input:focus, [data-theme="dark"] .form-textarea:focus {
    border-color: var(--primary-color);
}
