/* =================================================
   ULTRA COOL PROJECT PAGES - REDESIGNED 🎨
   ================================================= */

/* 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;
}

/* =================================================
   HERO HEADER - Glassmorphism + Floating Effect
   ================================================= */
.project-header {
    position: relative;
    height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
            var(--bg-color) 0%,
            var(--card-bg-color) 50%,
            var(--bg-color) 100%);
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(170, 128, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(200, 255, 50, 0.1) 0%, transparent 50%);
    z-index: 1;
    animation: pulse-glow 8s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

.project-header video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    opacity: 0.7;
    filter: saturate(1.2);
}

.project-header-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 3rem 4rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-width: 850px;
    margin: 0 auto;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: float-in 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: translateY(30px);
    opacity: 0;
}

@keyframes float-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.project-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(170, 128, 255, 0.3);
    letter-spacing: -2px;
    animation: title-pop 0.8s 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0.8);
    opacity: 0;
}

@keyframes title-pop {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.project-subtitle {
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fade-up 0.8s 0.5s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
}

@keyframes fade-up {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.project-links-header {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fade-up 0.8s 0.7s ease-out forwards;
    transform: translateY(20px);
    opacity: 0;
}

.project-links-header .cta-button {
    background: var(--accent-color);
    color: #111;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid transparent;
    box-shadow: 0 4px 20px rgba(200, 255, 50, 0.3);
}

.project-links-header .cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 30px rgba(200, 255, 50, 0.5);
    border-color: white;
}

/* =================================================
   CONTENT AREA - Neo-Brutalist Cards
   ================================================= */
.project-content {
    max-width: 1100px;
    margin: -4rem auto 4rem;
    padding: 3rem;
    position: relative;
    z-index: 20;
    background-color: var(--card-bg-color);
    border-radius: 32px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(170, 128, 255, 0.15);
}

.project-section {
    margin-bottom: 4rem;
    animation: section-appear 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.project-section:nth-child(1) {
    animation-delay: 0.1s;
}

.project-section:nth-child(2) {
    animation-delay: 0.2s;
}

.project-section:nth-child(3) {
    animation-delay: 0.3s;
}

.project-section:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes section-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-color-primary);
    position: relative;
    display: inline-block;
    padding-bottom: 0.8rem;
}

.project-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), rgba(170, 128, 255, 0.5), transparent);
    border-radius: 4px;
}

.project-section p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color-secondary);
}

/* =================================================
   FEATURE CARDS - Playful Bouncy Grid
   ================================================= */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.8rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg-color);
    padding: 2rem;
    border-radius: 20px;
    border: 3px solid rgba(170, 128, 255, 0.12);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-color), #aa80ff);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover {
    transform: translateY(-12px) rotate(-1deg);
    border-color: var(--accent-color);
    box-shadow:
        0 16px 40px rgba(170, 128, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-card h3::before {
    content: '✨';
    font-size: 1.2rem;
}

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

/* =================================================
   TECH STACK - Pill Tags with Pop Animation
   ================================================= */
.tech-stack-section {
    background: linear-gradient(135deg,
            rgba(170, 128, 255, 0.05) 0%,
            rgba(200, 255, 50, 0.03) 100%);
    border: 3px dashed rgba(170, 128, 255, 0.2);
    padding: 2.5rem;
    border-radius: 24px;
    margin: 3rem 0;
    position: relative;
}

.tech-stack-section::before {
    content: '🛠️';
    position: absolute;
    top: -15px;
    left: 30px;
    font-size: 1.8rem;
    background: var(--card-bg-color);
    padding: 0 10px;
}

.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(220px, 1fr));
    gap: 2.5rem;
}

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

.tech-category strong {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    transform: rotate(-2deg);
    display: inline-block;
    margin-bottom: 0.8rem;
}

.tech-category span {
    display: inline-block;
    background: rgba(170, 128, 255, 0.1);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color-primary);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    cursor: default;
}

.tech-category span:hover {
    transform: translateY(-4px) rotate(5deg) scale(1.08);
    background: var(--accent-color);
    color: white;
    border-color: transparent;
}

/* =================================================
   SCREENSHOTS - Polaroid Style Gallery
   ================================================= */
.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.screenshot {
    border-radius: 20px;
    overflow: hidden;
    background: var(--card-bg-color);
    padding: 12px 12px 40px;
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: rotate(0deg);
    border: 3px solid rgba(170, 128, 255, 0.1);
}

.screenshot:nth-child(odd) {
    transform: rotate(-2deg);
}

.screenshot:nth-child(even) {
    transform: rotate(2deg);
}

.screenshot:hover {
    transform: translateY(-15px) rotate(0deg) scale(1.03);
    box-shadow:
        0 20px 50px rgba(170, 128, 255, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* =================================================
   BACK BUTTON - Floating Action Button
   ================================================= */
.back-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7ab800 100%);
    color: #111111;
    padding: 1.1rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    box-shadow:
        0 8px 24px rgba(200, 255, 50, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 3px solid transparent;
    animation: bounce-in 0.8s 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: translateY(100px);
    opacity: 0;
}

@keyframes bounce-in {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.back-button:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow:
        0 12px 35px rgba(200, 255, 50, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: white;
}

.back-button:active {
    transform: translateY(-2px) scale(1.02);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-4px);
}

/* =================================================
   LIST STYLES - Fun Emoji Bullets
   ================================================= */
.project-section ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.project-section ul li {
    padding: 1rem 1.5rem 1rem 3.5rem;
    position: relative;
    color: var(--text-color-secondary);
    background: rgba(170, 128, 255, 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.project-section ul li:hover {
    background: rgba(170, 128, 255, 0.1);
    transform: translateX(8px);
}

.project-section ul li::before {
    content: '⚡';
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
}

/* =================================================
   DARK MODE ENHANCEMENTS
   ================================================= */
body.dark-mode .project-content {
    border-color: rgba(200, 255, 50, 0.15);
}

body.dark-mode .feature-card {
    background: rgba(30, 30, 35, 0.8);
    border-color: rgba(200, 255, 50, 0.1);
}

body.dark-mode .feature-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 16px 40px rgba(200, 255, 50, 0.15);
}

body.dark-mode .tech-stack-section {
    background: linear-gradient(135deg,
            rgba(200, 255, 50, 0.03) 0%,
            rgba(170, 128, 255, 0.05) 100%);
    border-color: rgba(200, 255, 50, 0.2);
}

body.dark-mode .screenshot {
    background: rgba(30, 30, 35, 0.9);
    border-color: rgba(200, 255, 50, 0.1);
}

body.dark-mode .screenshot:hover {
    box-shadow: 0 20px 50px rgba(200, 255, 50, 0.2);
    border-color: var(--accent-color);
}

body.dark-mode .tech-category span:hover {
    color: #111111;
}

body.dark-mode .project-section ul li {
    background: rgba(200, 255, 50, 0.03);
    border-left-color: var(--accent-color);
}

body.dark-mode .project-section ul li:hover {
    background: rgba(200, 255, 50, 0.08);
}

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

    .project-subtitle {
        font-size: 1.2rem;
    }

    .project-header {
        height: 60vh;
    }

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

    .project-content {
        margin-top: -2rem;
        padding: 2rem 1.5rem;
        border-radius: 24px;
    }

    .project-section h2 {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .project-header {
        height: 55vh;
    }

    .back-button {
        bottom: 1rem;
        right: 1rem;
        padding: 0.9rem 1.6rem;
        font-size: 0.9rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .tech-stack-section {
        padding: 1.5rem;
    }

    .screenshots {
        gap: 1.5rem;
    }

    .screenshot {
        padding: 8px 8px 30px;
    }
}