/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    background-color: #000000;
    color: #f5f5f5;
    font-family: 'Cinzel', serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Splash Screen */
.splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    cursor: pointer;
}

.splash.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-logo {
    max-width: 80%;
    width: 600px;
    height: auto;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.splash-logo.fade-in {
    opacity: 1;
}

/* Site Header */
.site-header {
    width: 100%;
    padding: 30px 20px;
    background-color: #000000;
    text-align: center;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* Logo */
.logo {
    max-width: 90%;
    width: 800px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Character Spread Section - Cross Layout */
.character-spread {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 20px 0;
}

/* Cross Layout Rows */
.cross-top,
.cross-bottom {
    display: flex;
    justify-content: center;
}

.cross-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Center button styling */
.center-btn {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Character Buttons */
.character-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(100%);
}

.character-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.character-btn:hover::before {
    left: 100%;
}

.character-btn:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.1);
    filter: grayscale(0%);
}

.character-btn:active {
    transform: translateY(-2px) scale(1.01);
}

.character-btn.flash::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    animation: flashEffect 0.5s ease-in-out forwards;
    pointer-events: none;
}

@keyframes flashEffect {
    0% {
        opacity: 0;
    }
    30% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
    }
}

.character-btn:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Nameplate Images */
.nameplate {
    display: block;
    width: 100%;
    height: auto;
    max-width: 180px;
    transition: filter 0.4s ease;
}

/* Hover Effect for Nameplates */
.character-btn:hover .nameplate {
    filter: brightness(1.1) contrast(1.1);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.footer-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.15em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.footer-copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.1em;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cross-middle {
        gap: 10px;
    }
    
    .nameplate {
        max-width: 160px;
    }
}

@media (max-width: 1000px) {
    .cross-middle {
        gap: 8px;
    }
    
    .nameplate {
        max-width: 140px;
    }
}

@media (max-width: 800px) {
    .nameplate {
        max-width: 120px;
    }
    
    .cross-middle {
        gap: 5px;
    }
}

@media (max-width: 650px) {
    .character-spread {
        gap: 10px;
    }
    
    .cross-middle {
        flex-wrap: wrap;
        max-width: 350px;
    }
    
    .nameplate {
        max-width: 100px;
    }
}

@media (max-width: 400px) {
    .main-title {
        font-size: 1.2rem;
        letter-spacing: 0.1em;
    }
    
    .nameplate {
        max-width: 80px;
    }
}

/* Selection Indicator */
.character-btn.selected {
    border-color: #ffffff;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    filter: grayscale(0%);
}

.character-btn.selected::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ffffff;
}

/* Subtle Animation for Ambient Feel */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.character-btn:nth-child(odd) {
    animation: float 6s ease-in-out infinite;
}

.character-btn:nth-child(even) {
    animation: float 6s ease-in-out infinite;
    animation-delay: -3s;
}

.character-btn:hover {
    animation-play-state: paused;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.97) 100%);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: transparent;
    border: none;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal-close {
    position: fixed;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
    z-index: 1001;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 50px;
    gap: 40px;
}

.modal-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    transform: rotate(-8deg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
    animation: cardFloat 4s ease-in-out infinite;
}

@keyframes cardFloat {
    0%, 100% {
        transform: rotate(-8deg) translateY(0);
    }
    50% {
        transform: rotate(-8deg) translateY(-10px);
    }
}

.modal-info {
    text-align: left;
    flex: 1;
}

.modal-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.modal-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent);
    margin-bottom: 20px;
}

.modal-description {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    text-transform: none;
}

@media (max-width: 700px) {
    .modal-body {
        flex-direction: column;
        padding: 40px 25px;
        gap: 30px;
    }
    
    .modal-image {
        transform: rotate(-5deg);
        max-width: 200px;
    }
    
    .modal-info {
        text-align: center;
    }
    
    .modal-divider {
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    }
    
    .modal-name {
        font-size: 1.8rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
    }
}
