/* Dark Mode Color Palette Variables */
:root {
    --red:#6F0F0A;
    --deep-red: #6F0F0A;
    --black: #0F0F0F;
    --charcoal: #1A1A1A;
    --dark-card: #1E1E1E;
    --darker-card: #222222;
    --border-dark: #333333;
    --grey: #B2B2B2;
    --light-grey: #C7C7C7;
    --soft-white: #F0F0F0;
    --pure-white: #FFFFFF;
    --yellow: #D8C63E;
    --input-bg: #1E1E1E;
    --placeholder: #888888;
    --video-bg: #181818;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--soft-white);
    background-color: var(--black);
}

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--red) 100%);
    color: var(--pure-white);
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--yellow);
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--pure-white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--yellow);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--deep-red) 100%, var(--black) 0%);
    color: var(--pure-white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="rgba(216,198,62,0.05)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--yellow);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: var(--red);
    color: var(--pure-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(181,43,27,0.4);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(181,43,27,0.6);
    background: var(--deep-red);
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--dark-card);
    border: 1px solid var(--border-dark);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(216,198,62,0.1), 0 0 30px rgba(216,198,62,0.05);
    border-color: var(--yellow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--yellow);
}

.feature-card p {
    color: var(--light-grey);
}

/* About Section */
.about {
    padding: 4rem 2rem;
    background: var(--black);
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--pure-white);
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--light-grey);
}

/* Tutorials Section */
.tutorials-section {
    padding: 4rem 2rem;
    min-height: 70vh;
    background: var(--charcoal);
}

.tutorials-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--pure-white);
}

.subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--light-grey);
    margin-bottom: 2rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--red);
    background: var(--dark-card);
    color: var(--soft-white);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--red);
    color: var(--pure-white);
    box-shadow: 0 0 15px rgba(181,43,27,0.4);
}

/* Tutorials Grid */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: var(--darker-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-dark);
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(216,198,62,0.1), 0 0 30px rgba(216,198,62,0.05);
    border-color: var(--yellow);
}

.tutorial-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--red) 0%, var(--deep-red) 100%);
}

.tutorial-content {
    padding: 1.5rem;
}

.tutorial-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--pure-white);
}

.difficulty-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.difficulty-badge.easy {
    background: rgba(216,198,62,0.2);
    color: var(--yellow);
    border: 1px solid var(--yellow);
}

.difficulty-badge.medium {
    background: rgba(178,178,178,0.2);
    color: var(--light-grey);
    border: 1px solid var(--light-grey);
}

.difficulty-badge.hard {
    background: rgba(181,43,27,0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

.tutorial-content p {
    color: var(--light-grey);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.paper-size {
    font-size: 0.9rem;
    color: var(--grey);
    margin-bottom: 1rem;
}

/* Tutorial Details */
.tutorial-details {
    padding: 4rem 2rem;
    min-height: 70vh;
    background: var(--charcoal);
}

.back-link {
    display: inline-block;
    color: var(--yellow);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--red);
}

.detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.detail-header h1 {
    font-size: 2.5rem;
    color: var(--pure-white);
    margin-bottom: 1rem;
}

.detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.detail-section {
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    border: 1px solid var(--border-dark);
}

.detail-section h2 {
    color: var(--yellow);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.steps-list {
    list-style: none;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--darker-card);
    border-radius: 8px;
    position: relative;
    padding-left: 3.5rem;
    border: 1px solid var(--border-dark);
    color: var(--soft-white);
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--red);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: var(--video-bg);
    border: 1px solid var(--border-dark);
}

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

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
}

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

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--light-grey);
}

/* Footer */
.footer {
    background: var(--black);
    color: var(--light-grey);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-dark);
}

.footer a {
    color: var(--yellow);
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--red);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .features h2,
    .about h2,
    .tutorials-section h1 {
        font-size: 2rem;
    }
    
    .tutorials-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .logo img {
        height: 28px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
}

/* React Component Styles */
.react-tutorial-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.react-tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.collapsible-step {
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.step-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: background 0.3s;
}

.step-header:hover {
    background: #e9ecef;
}

/* Form Styles */
.form-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
    min-height: 70vh;
}

.form-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--pure-white);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--dark-card);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    border: 1px solid var(--border-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--soft-white);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, background 0.3s;
    background: var(--input-bg);
    color: var(--pure-white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--yellow);
    background: var(--darker-card);
}

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

.submit-btn {
    background: var(--red);
    color: var(--pure-white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    width: 100%;
}

.submit-btn:hover {
    background: var(--deep-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(181,43,27,0.4);
}

/* Team Section */
.team-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.team-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

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

.team-card {
    background: var(--dark-card);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border-dark);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(216,198,62,0.1), 0 0 30px rgba(216,198,62,0.05);
    border-color: var(--yellow);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--deep-red), var(--red));
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--pure-white);
    box-shadow: 0 4px 15px rgba(181,43,27,0.3);
}

.team-card h3 {
    color: var(--yellow);
    margin-bottom: 0.5rem;
}

.team-card .role {
    color: var(--light-grey);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team-card p {
    color: var(--soft-white);
    font-size: 0.95rem;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.gallery-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid var(--border-dark);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 25px rgba(216,198,62,0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15,15,15,0.9), transparent);
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.faq-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item:hover {
    border-color: var(--yellow);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--soft-white);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--darker-card);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--yellow);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    color: var(--red);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--light-grey);
    line-height: 1.6;
}

/* Resources Section */
.resources-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.resources-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.resource-card {
    background: var(--dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(216,198,62,0.1), 0 0 30px rgba(216,198,62,0.05);
    border-color: var(--yellow);
}

.resource-card h3 {
    color: var(--yellow);
    margin-bottom: 1rem;
}

.resource-card p {
    color: var(--light-grey);
    margin-bottom: 1rem;
}

.resource-link {
    display: inline-block;
    color: var(--soft-white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.resource-link:hover {
    color: var(--yellow);
}

/* Paper Guide Section */
.paper-guide-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.paper-guide-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

.paper-types {
    max-width: 900px;
    margin: 0 auto;
}

.paper-type {
    background: var(--dark-card);
    border: 1px solid var(--border-dark);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.paper-type:hover {
    border-color: var(--yellow);
    box-shadow: 0 3px 15px rgba(216,198,62,0.1);
}

.paper-type h3 {
    color: var(--yellow);
    margin-bottom: 1rem;
}

.paper-type p {
    color: var(--light-grey);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.paper-type .specs {
    color: var(--grey);
    font-size: 0.9rem;
    font-style: italic;
}

/* History Section */
.history-section {
    padding: 4rem 2rem;
    background: var(--charcoal);
}

.history-section h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--pure-white);
}

.history-content {
    max-width: 900px;
    margin: 0 auto;
}

.history-timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--yellow);
    border: 3px solid var(--charcoal);
    box-shadow: 0 0 0 2px var(--yellow);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -2.55rem;
    top: 20px;
    width: 2px;
    height: calc(100% - 20px);
    background: var(--border-dark);
}

.timeline-item:last-child::after {
    display: none;
}

.timeline-item h3 {
    color: var(--yellow);
    margin-bottom: 0.5rem;
}

.timeline-item .period {
    color: var(--light-grey);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    color: var(--soft-white);
    line-height: 1.6;
}

/* Success Message */
.success-message {
    background: rgba(216,198,62,0.2);
    color: var(--yellow);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    display: none;
    border: 1px solid var(--yellow);
}

.success-message.show {
    display: block;
}

/* Error Message */
.error-message {
    background: rgba(181,43,27,0.2);
    color: var(--red);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
    display: none;
    border: 1px solid var(--red);
}

.error-message.show {
    display: block;
}
