/* Override body background for project pages */
body {
    background-color: var(--bg-color) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* Ensure smooth transitions for all themed elements */
.project-header,
.project-content,
.feature-card,
.tech-stack-section,
.project-section {
    transition: background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

.project-header {
    position: relative;
    height: 60vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, 
        var(--bg-color) 0%,
        var(--card-bg-color) 100%);
}

.project-header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.8;
}

.project-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.project-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.project-subtitle {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 2rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

.project-links-header {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.project-content {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
    background-color: var(--card-bg-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.project-section {
    margin-bottom: 4rem;
}

.project-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-primary);
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

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

.feature-card {
    background: var(--card-bg-color);
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.feature-card p {
    color: var(--text-color-secondary);
}

/* Skills-style tech stack */
.tech-stack-section {
    background: var(--card-bg-color);
    border: none;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tech-stack-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color-primary);
}

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

.tech-category {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tech-category strong {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-color-primary);
    transform: rotate(-2deg);
    margin-bottom: 0.8rem;
}

.tech-category span {
    display: inline-block;
    background: rgba(161, 168, 183, 0.1);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color-primary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tech-category span:hover {
    transform: translateY(-2px);
    background: var(--accent-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

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

.screenshot {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color-soft);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

.back-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--shadow-color-soft);
    transition: transform 0.3s ease, 
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    z-index: 100;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    transform: translateY(-3px);
    background: var(--accent-color-darker);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.back-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--shadow-color-soft);
}

.project-section ul {
    list-style: none;
    padding: 0;
}

.project-section ul li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: var(--text-color-secondary);
}

.project-section ul li::before {
    content: '⚡️';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .project-title {
        font-size: 3rem;
    }

    .project-header {
        height: 50vh;
    }

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

    .tech-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 2.5rem;
    }

    .project-header-content {
        padding: 1.5rem;
    }

    .back-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.8rem 1.5rem;
    }
}