/* 
 * Credits Modal Styling 
 * ASTRO-TANKS Theme 
 */

.credits-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.credits-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.credits-overlay.closing {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.credits-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px); /* Initialize backdrop filter */
    -webkit-backdrop-filter: blur(0px);
    transition: background 0.6s ease, backdrop-filter 0.6s ease;
}

.credits-overlay.active .credits-backdrop {
    background: rgba(0, 0, 0, 0.6); /* Slightly more transparent to emphasize modal liquid glass */
    backdrop-filter: blur(14px); /* True liquid glass backdrop */
    -webkit-backdrop-filter: blur(14px);
}

.credits-modal {
    position: relative;
    background: rgba(12, 16, 28, 0.88);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: scale(0.92) translateY(20px) translateZ(0); /* Promoted for GPU liquid glass */
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s,
                opacity 0.5s ease 0.1s;
}

/* Custom scrollbar for modal */
.credits-modal::-webkit-scrollbar {
    width: 6px;
}
.credits-modal::-webkit-scrollbar-track {
    background: transparent;
    margin: 1rem 0;
}
.credits-modal::-webkit-scrollbar-thumb {
    background: rgba(241, 201, 139, 0.4);
    border-radius: 6px;
}

.credits-overlay.active .credits-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.credits-overlay.closing .credits-modal {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.credits-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.credits-close:hover {
    background: rgba(255,59,48,0.1);
    border-color: #ff3b30;
    color: #ff3b30;
    transform: rotate(90deg) scale(1.1);
}

.credits-header {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.credits-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.05em;
    color: var(--text-main);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    text-shadow: 0 0 20px rgba(241, 201, 139, 0.15);
}

.credits-title span {
    color: var(--text-muted);
}

.credits-subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Individual Glassmorphism Developer Card */
.credit-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    opacity: 0;
    transform: translateY(20px) translateZ(0); /* For GPU layer */
    text-decoration: none;
    cursor: pointer;
    min-height: 160px;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.credits-overlay.active .credit-card {
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered load animation */
.credit-card:nth-child(1) { animation-delay: 0.1s; }
.credit-card:nth-child(2) { animation-delay: 0.2s; }
.credit-card:nth-child(3) { animation-delay: 0.3s; }
.credit-card:nth-child(4) { animation-delay: 0.4s; }
.credit-card:nth-child(5) { animation-delay: 0.5s; }

/* Neon Top Border */
.card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Hover Physics */
.credit-card:hover {
    transform: translateY(-6px) scale(1.02) translateZ(0);
    border-color: rgba(241, 201, 139, 0.18);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.credit-card:hover .card-glow {
    height: 5px;
    box-shadow: 0 0 15px var(--accent);
    opacity: 1;
}

.dev-name {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 1.2rem;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 2;
}

.dev-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 2;
    position: relative;
}

/* Card Action Button (Know More / Get in Touch) */
.card-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: auto;
    z-index: 2;
    position: relative;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-know-more {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.btn-know-more svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.credit-card:hover .card-action {
    opacity: 1;
}

.credit-card:hover .btn-know-more {
    color: var(--thruster);
}

.credit-card:hover .btn-know-more svg {
    opacity: 1;
    transform: translateX(4px);
    stroke: var(--thruster);
}

/* Pill Badges - Liquid Glass Theme */
.role-badge {
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    
    /* Liquid Glass Base */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--white);
    
    /* Smooth transition for hover effects */
    transition: all 0.3s ease;
    transform: translateZ(0); /* GPU Acceleration */
}

/* Subtle variations using website palette instead of bright flat colors */
.role-design { border-color: rgba(241, 201, 139, 0.3); color: var(--thruster); } 
.role-sound { border-color: rgba(140, 165, 211, 0.3); color: var(--cyan); }  
.role-art { border-color: rgba(229, 231, 235, 0.3); color: var(--steel-light); }    
.role-dev { border-color: rgba(241, 201, 139, 0.4); color: var(--thruster); background: rgba(241, 201, 139, 0.05); }    
.role-tech { border-color: rgba(140, 165, 211, 0.4); color: var(--cyan); background: rgba(140, 165, 211, 0.05); } 
.role-3d { border-color: rgba(156, 163, 175, 0.4); color: var(--steel-gray); }     
.role-web { border-color: rgba(241, 201, 139, 0.5); color: var(--thruster); background: rgba(241, 201, 139, 0.08); }

.credit-card:hover .role-badge {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
