/* SS-Travi Login V3.1 - Enhanced Professional & Interactive */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Montserrat:wght@300;400;500;600&display=swap');

/* --- GLOBAL RESET & BOX SIZING --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- CORE RESET & SETUP --- */
body.login-v3 {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important; /* Prevent horizontal scroll */
    min-width: 0 !important; /* Override legacy min-width */
    min-height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #000 !important;
    font-family: 'Montserrat', sans-serif !important;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Register Grid specific */
.v3-register-grid {
    grid-template-columns: 1fr !important;
    max-width: 700px !important;
    margin: 0 auto;
}

/* Safe Select Input */
select.v3-input {
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Hide legacy elements */
body.login-v3:before, body.login-v3:after,
body.login-v3 #background, body.login-v3 #ce { 
    display: none !important; 
}

/* --- ANIMATED BACKGROUND --- */
.v3-bg-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-image: url('../../../img/background.webp'); /* Changed background image */
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    animation: slowZoom 60s infinite alternate;
}

@keyframes slowZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

.v3-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.9) 90%);
    pointer-events: none;
}

/* --- LAYOUT STRUCTURE --- */
.v3-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    backdrop-filter: blur(2px); /* Subtle glass effect on whole page */
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* --- HEADER --- */
.v3-header {
    display: flex; /* Flex by default for mobile */
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    z-index: 10;
    position: relative;
    width: 100%;
}

@media (min-width: 900px) {
    .v3-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        justify-items: center;
        padding: 20px 5%;
    }
}

.v3-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem; /* Smaller on mobile */
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

@media (min-width: 900px) {
    .v3-brand {
        grid-column: 2;
        font-size: 2.5rem;
    }
}

.v3-brand span {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* Mobile Menu Toggle */
.v3-menu-toggle {
    display: block; /* Visible on mobile */
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}

@media (min-width: 900px) {
    .v3-menu-toggle {
        display: none; /* Hidden on desktop */
        grid-column: 3;
        justify-self: end;
    }
}

/* Desktop Navigation */
.v3-nav {
    display: none; /* Mobile first, hidden by default */
    grid-column: 3; /* Place nav in the third column (desktop only) */
    justify-self: end; /* Align to the end of the column */
}

@media (min-width: 900px) {
    .v3-nav {
        display: flex;
        gap: 30px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .v3-nav a {
        color: #aaa;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.9rem;
        text-transform: uppercase;
        transition: color 0.3s;
        position: relative;
    }

    .v3-nav a:hover, .v3-nav a.active {
        color: #fff;
    }

    .v3-nav a::after {
        content: '';
        position: absolute;
        bottom: -5px; left: 0; width: 0; height: 2px;
        background: #ffd700;
        transition: width 0.3s;
    }

    .v3-nav a:hover::after, .v3-nav a.active::after {
        width: 100%;
    }
}

/* --- MAIN CONTENT AREA --- */
.v3-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed to flex-start for better scrolling */
    padding: 40px 20px;
    perspective: 1000px;
}

.v3-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
}

.v3-grid > * {
    min-width: 0; /* Prevent grid blowout from wide content */
}

@media (min-width: 900px) {
    .v3-grid {
        grid-template-columns: 1.2fr 0.8fr; /* Form Left, Info Right */
        align-items: start;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- GLASSMOPHISM CARDS --- */
.v3-card {
    background: rgba(22, 26, 30, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.v3-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    border-color: rgba(212, 175, 55, 0.3);
}

/* Shine effect */
.v3-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: 0.5s;
    pointer-events: none;
}

.v3-card:hover::before {
    left: 100%;
}

.v3-card h2, .v3-card h3 {
    font-family: 'Cinzel', serif;
    color: #fff;
    margin-top: 0;
    font-weight: 700;
    border-left: 3px solid #ffd700;
    padding-left: 15px;
    margin-bottom: 25px;
}

/* --- FORMS & INPUTS --- */
.v3-input-group {
    position: relative;
    margin-bottom: 25px;
}

.v3-input-group label {
    position: absolute;
    top: 50%; left: 15px;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: 0.3s;
    background: transparent;
    padding: 0 5px;
}

.v3-input-group input:focus + label,
.v3-input-group input:not(:placeholder-shown) + label,
.v3-input-group select:focus + label,
.v3-input-group select:not([value=""]) + label {
    top: -10px;
    left: 10px;
    font-size: 0.8rem;
    color: #ffd700;
    background: #161a1e; /* Match card bg to hide line */
    transform: translateY(0);
}

.v3-input {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: 0.3s;
    outline: none;
}

.v3-input:focus {
    border-color: #ffd700;
    background: rgba(0,0,0,0.5);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* Custom Checkbox */
.v3-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #aaa;
    user-select: none;
}

.v3-checkbox.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.coming-soon {
    margin-left: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff00cc, #333399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.v3-checkbox input {
    display: none;
}

.v3-checkmark {
    width: 20px; height: 20px;
    border: 2px solid #555;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.v3-checkbox input:checked + .v3-checkmark {
    background: #ffd700;
    border-color: #ffd700;
    color: #000;
}

.v3-checkmark::after {
    content: '✔';
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: 0.2s;
}

.v3-checkbox input:checked + .v3-checkmark::after {
    opacity: 1;
    transform: scale(1);
}

/* --- BUTTONS --- */
.v3-btn {
    width: 100%;
    padding: 16px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    display: block;
    text-decoration: none;
}

.v3-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0; height: 100%;
    background: #ffaa00;
    transition: 0.3s;
    z-index: -1;
}

.v3-btn:hover::before {
    width: 100%;
}

.v3-btn:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.02);
    transform-origin: center;
    will-change: transform, box-shadow;
}

/* Secondary Button (Green - Register) */
.v3-btn.register {
    background: #4cd137;
    color: #fff;
}
.v3-btn.register::before { background: #44bd32; }
.v3-btn.register:hover { box-shadow: 0 0 20px rgba(76, 209, 55, 0.4); }

/* CTA Card */
.v3-cta-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(0,0,0,0.5));
    border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

.v3-cta-card h3 {
    border-left: none;
    padding-left: 0;
    font-size: 1.5rem;
    color: #ffd700;
}

.v3-cta-text {
    margin-bottom: 20px;
    color: #ccc;
    font-size: 0.95rem;
}

/* --- INFO LISTS (Sidebar) --- */
.v3-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.v3-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ccc;
    font-size: 0.95rem;
}

.v3-list li:last-child {
    border-bottom: none;
}

.v3-list b {
    color: #ffd700;
}

/* --- SERVER CARDS --- */
.v3-server {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    transition: 0.3s;
}

.v3-server:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
}

.v3-server-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    display: block;
}

.v3-server-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
}

.v3-server-timer {
    color: #4cd137;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- MEGA FOOTER --- */
.v3-mega-footer {
    background: rgba(10, 12, 15, 0.95);
    border-top: 1px solid #222;
    padding: 60px 5% 20px;
    margin-top: auto;
}

.v3-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.v3-footer-col h4 {
    color: #fff;
    font-family: 'Cinzel', serif;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1rem;
    border-bottom: 2px solid #ffd700;
    display: inline-block;
    padding-bottom: 5px;
}

.v3-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.v3-footer-links li {
    margin-bottom: 10px;
}

.v3-footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.v3-footer-links a:hover {
    color: #ffd700;
    padding-left: 5px;
}

.v3-social-icons {
    display: flex;
    gap: 15px;
}

.v3-social-icon {
    width: 40px; height: 40px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid #333;
    font-weight: bold;
}

.v3-social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.v3-social-icon:hover {
    background: #ffd700;
    color: #000;
    transform: translateY(-3px);
}

.v3-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #555;
    font-size: 0.8rem;
}

/* --- UTILS --- */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.text-gold { color: #ffd700; }
.error-msg { color: #ff4757; font-size: 0.85rem; margin-top: 5px; display: block; }
.success-box {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid #2ed573;
    color: #2ed573;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
}
.hidden, .hide { display: none !important; }

/* Mobile Menu Toggle */
.v3-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}

@media (max-width: 899px) {
    .v3-menu-toggle { display: block; }
    
    .v3-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; width: 100%;
        background: rgba(10, 12, 15, 0.98);
        flex-direction: column;
        padding: 0;
        text-align: center;
        z-index: 20;
        border-bottom: 1px solid rgba(255,215,0,0.2);
    }
    
    .v3-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        color: #e0e0e0;
        text-decoration: none;
        display: block;
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.9rem;
    }

    .v3-nav a:hover, .v3-nav a.active {
        background: rgba(255, 215, 0, 0.1);
        color: #ffd700;
    }
    
    .v3-nav.open { display: flex; }
    
    .v3-grid { grid-template-columns: 1fr; }
    .v3-card { padding: 25px; }
    
    .v3-mega-footer { padding: 40px 20px 20px; }
}

@media (max-width: 600px) {
    .v3-card { padding: 20px; margin-bottom: 20px; }
    .v3-header { padding: 15px; }
    .v3-brand { font-size: 1.5rem; }
    .v3-grid { gap: 20px; }
    .v3-main { padding: 20px 10px; align-items: flex-start; }
    .v3-input { font-size: 16px; } /* Prevent iOS zoom */
}

/* --- COUNTDOWN --- */
#worldStartInfo {
    background-image: none !important; /* Remove legacy image */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 0 auto 30px auto !important;
    width: 100% !important;
    height: auto !important; /* Override legacy fixed height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#worldStartInfo .countdownContent {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem !important;
    color: #4cd137 !important; /* Green for go/active */
    text-shadow: 0 0 10px rgba(76, 209, 55, 0.4);
    margin-top: 10px;
    position: static !important; /* Remove absolute positioning */
    left: auto !important;
    top: auto !important;
    width: auto !important;
}

#worldStartInfo > div:first-child { /* The label */
    font-family: 'Cinzel', serif;
    color: #ffd700 !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- UPCOMING SERVERS FEATURED CARD --- */
.v3-card-upcoming {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(0,0,0,0.8));
    border: 1px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Flash/Pulse animation for the border/glow */
@keyframes glowPulse {
    0% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.5); }
    100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.2); }
}

.v3-card-upcoming:hover {
    animation: glowPulse 2s infinite;
}

/* New badge */
.v3-card-upcoming::after {
    content: 'NEW';
    position: absolute;
    top: 15px;
    right: -30px;
    background: #de0000;
    color: #fff;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-weight: bold;
    font-size: 0.8rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* --- TRIBE SELECTION WIZARD (The Twist) --- */
#presentation {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Inputs are hidden at the top of #presentation */
#presentation > input[type="radio"] {
    display: none;
}

/* Character Preview Container (Above Buttons) */
#characterPreview {
    width: 100%;
    height: 300px; /* Adjust based on image size */
    position: relative;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align images to bottom */
}

#characterPreview img {
    display: none; /* Hidden by default */
    max-height: 100%;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Show specific character based on checked radio */
#tribe3:checked ~ #characterPreview .char-3 { display: block; }
#tribe1:checked ~ #characterPreview .char-1 { display: block; }
#tribe2:checked ~ #characterPreview .char-2 { display: block; }
#tribe6:checked ~ #characterPreview .char-6 { display: block; }
#tribe7:checked ~ #characterPreview .char-7 { display: block; }


/* Selectors (Buttons) Row */
#tribeSelectors {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    width: 100%;
    z-index: 10; /* Above descriptions if needed */
}

/* Selector Styling (Small Icons) */
.selector {
    width: 100px;
    height: 100px;
    background-color: transparent;
    border: 2px solid transparent; /* Invisible border by default */
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, filter 0.2s ease;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: grayscale(100%);
    margin-bottom: 20px; /* Added space for the label */
}

.selector .tribe-name {
    position: absolute;
    bottom: -35px; /* Lowered to prevent overlap */
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    text-align: center;
    font-size: 0.75rem;
    color: #ccc;
    font-family: 'Montserrat', sans-serif;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    transition: color 0.2s;
}

.selector:hover .tribe-name,
input[type="radio"]:checked + .selector .tribe-name {
    color: #ffd700;
    font-weight: bold;
}

.selector:hover {
    transform: translateY(-5px);
    border-color: #ffd700;
    filter: grayscale(0%);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Mapping Radio to Selector Styles using Sibling Selectors 
   Since labels are siblings of inputs in the HTML structure I created:
   input#tribeX ~ #tribeSelectors label[for="tribeX"] 
*/
#tribe3:checked ~ #tribeSelectors label[for="tribe3"],
#tribe1:checked ~ #tribeSelectors label[for="tribe1"],
#tribe2:checked ~ #tribeSelectors label[for="tribe2"],
#tribe6:checked ~ #tribeSelectors label[for="tribe6"],
#tribe7:checked ~ #tribeSelectors label[for="tribe7"] {
    border-color: #4cd137;
    background-color: rgba(76, 209, 55, 0.15);
    box-shadow: 0 0 20px rgba(76, 209, 55, 0.6);
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Correct Image Paths for Selectors (Small/Medium Icons) */
label[for="tribe1"] { background-image: url('../../img/u/romans.png'); }
label[for="tribe2"] { background-image: url('../../img/u/teutons.png'); }
label[for="tribe3"] { background-image: url('../../img/u/gauls.png'); }
label[for="tribe6"] { background-image: url('../../img/u/egyptians.png'); }
label[for="tribe7"] { background-image: url('../../img/u/huns.png'); }



/* Descriptions (Below Buttons) */
#tribeDescriptions {
    width: 100%;
    position: relative;
    min-height: 200px; /* Prevent layout jump */
}

.tribeDescription {
    display: none;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid #444;
    border-left: 4px solid #4cd137;
    border-radius: 8px;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

/* Show active description */
#tribe3:checked ~ #tribeDescriptions .desc-3 { display: block; }
#tribe1:checked ~ #tribeDescriptions .desc-1 { display: block; }
#tribe2:checked ~ #tribeDescriptions .desc-2 { display: block; }
#tribe6:checked ~ #tribeDescriptions .desc-6 { display: block; }
#tribe7:checked ~ #tribeDescriptions .desc-7 { display: block; }

.tribeDescription h2 {
    color: #ffd700;
    font-family: 'Cinzel', serif;
    margin-top: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.tribeDescription ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tribeDescription li {
    color: #ccc;
    font-size: 0.9rem;
    padding-left: 20px;
    position: relative;
}

.tribeDescription li:before {
    content: '➤';
    position: absolute;
    left: 0;
    color: #4cd137;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #characterPreview {
        height: 200px;
    }
    
    .selector {
        width: 60px;
        height: 60px;
    }
    
    .tribeDescription ul {
        grid-template-columns: 1fr;
    }
}

/* --- SECTOR SELECTION MAP --- */
#presentation.sectors {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#activationMapContainer {
    position: relative;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%; /* Circular map container if desired, or square */
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

#map {
    width: 400px;
    max-width: 100%; /* Responsive width */
    height: auto;
    aspect-ratio: 1/1; /* Maintain square shape */
    background-image: url('../../img/activate/sectorSelection/map.png');
    background-size: cover;
    position: relative;
    border-radius: 4px;
    overflow: hidden; /* Keep selection within bounds */
}

#map input {
    display: none;
}

#map label {
    position: absolute;
    width: 50%;
    height: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    color: rgba(255,255,255,0.7);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.2); /* Slight tint */
}

/* Positions */
#map label[for="sector_nw"] { top: 0; left: 0; border-right: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }
#map label[for="sector_no"] { top: 0; right: 0; border-left: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }
#map label[for="sector_sw"] { bottom: 0; left: 0; border-right: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1); }
#map label[for="sector_so"] { bottom: 0; right: 0; border-left: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1); }

/* Hover State */
#map label:hover {
    background-color: rgba(76, 209, 55, 0.2); /* Green tint */
    color: #fff;
    text-shadow: 0 0 10px rgba(76, 209, 55, 0.8);
}

/* Selected State */
#map input:checked + label {
    background-color: rgba(76, 209, 55, 0.4); /* Stronger green */
    color: #ffd700;
    box-shadow: inset 0 0 20px rgba(76, 209, 55, 0.5);
}

/* Recommended Text Styling (data-text) */
#map label[data-text]:after {
    content: attr(data-text);
    position: absolute;
    bottom: 10px;
    font-size: 0.7rem;
    color: #ffd700;
    text-transform: uppercase;
    background: rgba(0,0,0,0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Mobile Adjustments */
@media (max-width: 500px) {
    #map {
        /* Width is handled by max-width now */
    }
    #map label {
        font-size: 1rem;
    }
}

/* --- CONFIRMATION PAGE (Ready to Play) --- */
.v3-confirmation-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.v3-confirm-header {
    margin-bottom: 40px;
}

.v3-title-gold {
    color: #ffd700;
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.v3-subtitle {
    color: #ccc;
    font-size: 1.1rem;
    margin: 0;
}

/* Showcase Card */
.v3-confirm-showcase {
    width: 100%;
    margin-bottom: 50px;
    perspective: 1000px;
}

.v3-confirm-card {
    background: rgba(25, 25, 30, 0.8);
    border: 1px solid rgba(76, 209, 55, 0.3);
    border-radius: 15px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 50px rgba(76, 209, 55, 0.1);
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.5) 25%, transparent 25%, transparent 50%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.5) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
}

/* Tribe Visual */
.v3-tribe-visual {
    width: 200px;
    height: 250px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.2));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Specific Tribe Images */
.v3-tribe-visual.tribe-1 { background-image: url('gpack/img/u/big/romans-large.png'); } /* Romans */
.v3-tribe-visual.tribe-2 { background-image: url('gpack/img/u/big/teutons-large.png'); } /* Teutons */
.v3-tribe-visual.tribe-3 { background-image: url('gpack/img/u/big/gauls-large.png'); } /* Gauls */
.v3-tribe-visual.tribe-6 { background-image: url('gpack/img/u/big/egyptians-large.png'); } /* Egyptians */
.v3-tribe-visual.tribe-7 { background-image: url('gpack/img/u/big/huns-large.png'); } /* Huns */

.v3-confirm-details h3 {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
}

.v3-confirm-details p {
    color: #4cd137;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Play Button */
.v3-play-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.v3-btn-play {
    background: linear-gradient(to bottom, #4cd137, #44bd32);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 20px 60px;
    border-radius: 50px;
    box-shadow: 0 0 30px rgba(76, 209, 55, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    width: 100%; /* Changed from auto */
    max-width: 300px; /* Added max-width */
}

.v3-btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(76, 209, 55, 0.6);
}

.v3-btn-play .btn-text {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

/* Loading Tips */
.v3-loading-tips {
    margin-top: 30px;
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

/* Mobile */
@media (max-width: 600px) {
    .v3-title-gold { font-size: 1.8rem; }
    .v3-btn-play { width: 100%; font-size: 1.2rem; padding: 15px; }
}