/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0b0b0b;
    --bg-secondary: #151515;
    --bg-card: #1a1a1a;
    --text-primary: #e6e6e6;
    --text-secondary: #a0a0a0;
    --accent-red: #d12b2b;
    --accent-red-dark: #a81f1f;
    --accent-red-light: #ff3b3b;
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(209, 43, 43, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header - Index navbar is now in index_navbar.php */
header {
    position: relative;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(209, 43, 43, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(209, 43, 43, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(209, 43, 43, 0.02) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(11, 11, 11, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    transition: var(--transition);
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-red);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: var(--shadow-glow);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login,
.btn-signup {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-login {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-login:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.btn-signup {
    background: var(--accent-red);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-signup:hover {
    background: var(--accent-red-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* Mobile menu styles moved to index_navbar.php */

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero-title .highlight {
    color: var(--accent-red);
    display: block;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition);
    font-size: 1rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-red-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-red);
}

.btn-secondary:hover {
    background: var(--accent-red);
    color: white;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-red);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tree Visualization */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tree-visualization {
    position: relative;
    width: 400px;
    height: 400px;
}

.tree-node {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.main-node {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.tree-branch {
    position: absolute;
    opacity: 0;
    animation: branchAppear 1s ease-out forwards;
}

.branch-1 {
    top: 10%;
    left: 60%;
}

.branch-1 .tree-node {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.branch-2 {
    top: 55%;
    right: 5%;
    animation-delay: 0.3s;
}

.branch-2 .tree-node {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.branch-3 {
    bottom: 15%;
    left: 55%;
    animation-delay: 0.6s;
}

.branch-3 .tree-node {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: var(--shadow-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(209, 43, 43, 0.5); }
}

@keyframes branchAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
    background: var(--bg-primary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.step {
    position: relative;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    box-shadow: var(--shadow-md);
}

.step-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Stories Preview Section */
.stories-preview {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        display: grid !important;
    }
    
    .story-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

.story-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.story-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-red);
    box-shadow: var(--shadow-md);
}

.story-cover {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-red-dark), var(--accent-red));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.story-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-info {
    padding: 1.5rem;
}

.story-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.story-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.story-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-continue {
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-continue:hover {
    background: var(--accent-red);
    color: white;
    transform: translateY(-2px);
}

.cta-center {
    text-align: center;
    margin-top: 3rem;
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--accent-red-dark), var(--accent-red));
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    color: white;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.cta-section .btn-primary {
    background: white;
    color: var(--accent-red);
}

.cta-section .btn-primary:hover {
    background: var(--text-primary);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: var(--bg-primary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-red);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    padding: 0;
}

.social-links a:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 90%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--accent-red);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.9rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(209, 43, 43, 0.1);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.modal-footer a {
    color: var(--accent-red);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        order: -1;
    }

    .tree-visualization {
        width: 300px;
        height: 300px;
    }

    /* Navbar styles moved to index_navbar.php */
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-buttons {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
    }

    .tree-visualization {
        width: 250px;
        height: 250px;
    }

    .tree-node {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .branch-1 .tree-node,
    .branch-2 .tree-node,
    .branch-3 .tree-node {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}