:root {
    /* Theme colors - using exact specified values */
    --primary: #ad181c;
    --primary-light: #df6267;
    --primary-dark: #670407;
    --text-light: #000000;
    --text-dark: #bdbdbd;
    --white: #f5f5f5;
    --black: #000000;
    --gray: #000000;
    --error: #000000;
    --success: #000000;
    
    /* Utility colors derived from theme colors */
    --shadow-light: rgba(189, 189, 189, 0.2); /* Using text-dark with opacity */
    --shadow-dark: rgba(0, 0, 0, 0.2);
    --shadow-darker: rgba(0, 0, 0, 0.4);
    --overlay-light: rgba(245, 245, 245, 0.397); /* Using white with opacity */
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --overlay-medium: rgba(0, 0, 0, 0.2);
    --overlay-very-light: rgba(0, 0, 0, 0.05);
    
    /* Basic layout constants */
    --header-height: 60px;
    --tile-size: calc(3vh - 0.03 * var(--header-height));
}

/* Color Reference Documentation
 * ---------------------------
 * Primary Colors:
 * - Primary: #476e34
 * - Primary Light: #6aad46
 * - Primary Dark: #203D0E
 * 
 * Accent Colors:
 * - Accent: #981c21
 * 
 * Text Colors:
 * - Text: #2e2e2e
 * 
 * Background Colors:
 * - Background: #47665F
 */

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    padding-top: var(--header-height);
    font-family: inherit;
    background-color: var(--primary);
    color: var(--text-light);
}
.default-as-reference{
    background: #476e34; /* primary*/
    background: #6aad46; /* primaryLight*/
    background: #203D0E; /* primaryDark*/   
    background: #981c21; /* accent*/
    background: #2e2e2e; /* textColor*/
    background: #47665F; /* backgroundColor*/
  
}

/* Header and Navigation */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--primary); /* Default theme primary color */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
}

.nav-button {
    background-color: var(--primary-light);
    color: var(--text-light);
    border: none;
    border-radius: 5px;
    padding: 8px 20px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    margin: 0 5px;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--black);
    background-color: var(--primary-light);
}

.nav-button:disabled {
    background-color: var(--gray);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}
.end-game {
    background-color: var(--primary);
    border: 0px solid var(--primary-light);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
}

.end-game:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--black);
} 
/* Base Game Container - Bottom Layer */
.game-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0px solid black;
    background-color: var(--primary);
}

/* Board Wrapper - Maintain aspect ratio */
.board-wrapper {
    position: relative;
    width: min(99vw, calc((99vh - var(--header-height)) * 4/3));
    height: min(calc(99vw * 3/4), calc(99vh - var(--header-height)));
    margin: auto;
}

/* Game Board - Layer 1 */
#gameBoard {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 10;
    background-color: transparent;
}

/* Tiles Container - Match board exactly */
#tilesContainer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: auto;
}

/* Individual Tiles - Layer 3 */
.tile {
    position: absolute;
    width: clamp(20px, var(--tile-size), 40px);
    height: clamp(20px, var(--tile-size), 40px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 0px solid var(--primary);
    z-index: 30;
    cursor: pointer;
}

.tile:hover {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: var(--shadow-light);
}

.tile.active {
    border-color: var(--primary-light);
    border-width: 0px;
    z-index: 35;
}

/* Game Token - Layer 4 (Always on top of tiles) */
.game-token {
    position: absolute;
    width: clamp(30px, 4vmin, 50px);
    height: clamp(30px, 4vmin, 50px);
    transform: translate(-50%, -50%);
    z-index: 40;
    pointer-events: none;
    background-image: url('../media/token.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease-in-out;
}

/* Popup - Topmost Layer */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black);
    z-index: 1000;
    display: none;
}

/* Show circle on hover */
.tile:hover {
    background-color: var(--overlay-light);
    box-shadow: 0 0 10px var(--shadow-light);
}



/* Login Page */
.login-page {
    background: var(--primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background-color: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 25px var(--black);
    animation: fadeIn 0.5s ease-out;
}

.login-box h1 {
    font-family: var(--font-heading);
    color: var(--primary);
    text-align: center;
    margin-bottom: 30px;
}

.input-group input {
    background-color: var(--white);
    border: 2px solid var(--gray);
    border-radius: 25px;
    padding: 12px 40px;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.login-button {
    align-self:center;
    background: var(--primary-light);
    border-radius: 10px;
    font-weight: bold;
    transform-origin: center;
    transition: all 0.3s;
    padding: 5px;
}

.login-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Popup Styles */
.popup-content {
    position: relative;
    margin: 15vh auto;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px var(--shadow-dark);
    background-color: var(--white);
    color: var(--white);
}

.popup-content h2 {
    color: var(--primary);
    margin-bottom: 15px;
}

.close-popup {
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
    padding: 5px;
    line-height: 1;
    z-index: 1001;
}

.close-popup:hover {
    color: var(--primary-light);
}

/* Media Container Styles */
.media-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--black);
}

.media-container img,
.media-container video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.media-container video {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    background: var(--black);
}


/* Add loading indicator */
.media-container::before {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    opacity: 0;
    transition: opacity 0.3s;
}

.media-container.loading::before {
    opacity: 1;
}

/* Timer Container Styles */
/*.timer-container {
    width: 100%;
    height: 8px;
    background-color: var(--background-color);
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 0px solid rgba(0, 0, 0, 0.1);
}*/

/*.timer-bar {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: var(--primary-color);
    transform-origin: left;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}*/

@keyframes timerAnimation {
    0% {
        transform: scaleX(1);
        right: 0;
    }
    100% {
        transform: scaleX(0);
        right: 0;
    }
}

/* Popup Details Style */
#popupDetails {
    color: var(--text-light);
    margin: 15px 0;
    line-height: 1.5;
}

#popupTitle {
    color: var(--text-light);
    margin-bottom: 15px;
    font-size: 1.5em;
}

#timeRemaining {
    color: var(--text-light);
    font-family: monospace;
    font-size: 1.2em;
}

/* Settings Page */
.settings-container {
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 8px 16px var(--shadow-color);
    padding: 30px;
    margin-top: 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media Queries */
@media (max-width: 768px) {
    .board-wrapper {
        width: 95%;
    }
    
    .popup-content {
        width: 95%;
        margin: 10px auto;
    }
}

/* Accessibility */
:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
} 

/* API Documentation Styles */
#swagger-ui {
    margin-top: 80px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.swagger-ui .topbar {
    display: none;
}

.swagger-ui .info {
    margin: 20px 0;
}

.swagger-ui .scheme-container {
    background: var(--primary-dark);
    box-shadow: none;
    border-radius: 10px;
}

.swagger-ui .btn {
    border-radius: 20px;
}

.swagger-ui .opblock {
    border-radius: 10px;
    margin: 0 0 15px;
}

.swagger-ui .opblock .opblock-summary {
    padding: 10px;
}

.swagger-ui .opblock .opblock-summary-method {
    border-radius: 5px;
    min-width: 80px;
} 

/* Login loading state */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
} 

/* Skinning Preview Styles */
.skinning-preview {
    max-width: 1200px;
    margin: 80px auto 20px;
    padding: 20px;
}

.preview-section {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.preview-section h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.logo-preview {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: 10px;
}

.logo-preview img {
    max-width: 300px;
    height: auto;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.color-box {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    border: 2px solid black;
}

.color-value {
    font-family: monospace;
    font-size: 14px;
    color: var(--text-dark);
}

.theme-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.preview-button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-card {
    padding: 20px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.preview-text {
    color: var(--text-dark);
    line-height: 1.6;
}

#rawThemeData {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
} 

/* Logo styles */
.game-logo {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 10px;
    background-color: transparent;
}

/* Logo positioning for different page types */
.login-page .game-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    margin: 0;
    z-index: 1000;
    background-color: transparent;
    border-radius: 50%;
}

.splash-page .game-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    margin: 0;
    z-index: 1000;
    background-color: transparent;
    border-radius: 50%;
}

/* Logo containers no longer need relative positioning since logo uses fixed positioning */

.board-logo {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 30;
    background-color: transparent;
}

.logo-preview img {
    max-width: 300px;
    height: auto;
    object-fit: contain;
    background-color: transparent;
    padding: 10px;
    border-radius: 5px;
    display: block;
} 

/* Add styles for the nav-right container */
.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
} 

/* Update nav-left to include logo */
.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
} 





/* Tooltip Styles */
.tile-tooltip {
    position: absolute;
    background-color: var(--overlay-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    top: -15px;
    left: 50%;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 8px var(--shadow-darker);
    font-family: monospace;
    font-weight: bold;
}

/* Show tooltip only on hover */
.tile:hover .tile-tooltip {
    opacity: 1;
}

/* Add pulse effect for active tile */
@keyframes tilePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
}

.tile.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: transparent;/*var(--accent-color);*/
    opacity: 0.4;
    transform: translate(-50%, -50%);
    animation: tilePulse 2s infinite;
    z-index: -1;
} 

.illustration-container {
    margin: 20px 0;
    text-align: center;
}

.illustration-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out;
}

.illustration-container img:hover {
    transform: scale(1.02);
} 

/* Status Bar Styles */
.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    background-color: var(--primary);
    color: var(--text-light);
    padding: 4px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    z-index: 90;
    font-family: monospace;
}

#coordinateDisplay {
    margin-left: auto;
} 

.game-select {
    background-color: var(--primary-light);
    color: var(--text-light);
    border: none;
    border-radius: 5px;
    padding: 8px 20px;
    margin-right: 15px;
    cursor: pointer;
    font-weight: bold;
}

.game-select:hover {
    background-color: var(--primary-light);
} 

/* Games Overview Styles */
.games-container {
    padding: 20px;
    margin-top: var(--header-height);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.game-card {
    background: var(--primary);
    color: var(--text-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px var(--black);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.game-status {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9em;
}

.game-status.active {
    background-color: var(--success);
    color: var(--white);
}

.game-status.finished {
    background-color: var(--gray);
    color: var(--text-dark);
}

.game-details {
    margin-bottom: 15px;
}

.game-details p {
    margin: 5px 0;
}

.game-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.no-games {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
    color: var(--text-light);
} 

/* Settings Link Styles */
.settings-link {
    color: var(--white);
    font-size: 1.2em;
    padding: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.settings-link:hover {
    transform: rotate(45deg);
} 

/* Document Display Styles */
.document-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: var(--overlay-very-light);
    border-radius: 8px;
}

.document-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.document-link:hover {
    transform: scale(1.05);
}

.document-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.document-title {
    font-size: 14px;
    text-align: center;
    color: var(--primary);
    margin-top: 8px;
}

.document-link:hover .document-title {
    text-decoration: underline;
} 

.media-container {
    width: 100%;
    margin: 20px 0;
    text-align: center;
    position: relative;
    padding: 0;
}

.tile-link {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: 0;
    transition: transform 0.2s ease-in-out;
}

.tile-thumbnail {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-dark);
    padding: 0;
    margin-top: 5px;
}

.media-placeholder {
    padding: 20px;
    border-radius: 8px;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

.media-type {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--black);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.media-caption {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
}

.tile-link {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: 0;
    transition: transform 0.2s ease-in-out;
}

.tile-thumbnail {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-dark);
    padding: 0;
    margin-top: 5px;
}

.timer-container {
    position: absolute;
    background-color: var(--overlay-medium);
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 2;
    border: 0px solid var(--shadow-dark);
}

.timer-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    box-shadow: 0 1px 3px var(--shadow-dark);
}

@keyframes timerAnimation {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.popup-content {
    padding: 20px;
    background-color: var(--white);
    color: var(--text-dark);
    box-shadow: 0 4px 12px var(--shadow-dark);
} 

.splash-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary);
    padding-top: var(--header-height);
}

.top-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--primary);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    box-shadow: 0 2px 4px var(--shadow-dark);
}

.menu-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 8px;
    border-right: 1px solid var(--shadow-light);
    margin-right: 5px;
}

.logout-icon {
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.logout-icon:hover {
    color: var(--primary-light);
}

.splash-container {
    text-align: center;
    padding: 2rem;
    background-color: var(--primary-dark);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-dark);
    animation: fadeIn 0.5s ease-out;
    position: relative;
    margin-top: 20px;
}

.splash-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.splash-logo {
    max-width: 200px;
    margin: 0 auto;
}

.game-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.game-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 300px;
    position: relative;
}

.splash-select {
    min-width: 300px;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    background-color: var(--primary-dark);
    color: var(--text-light);
    font-size: 1.1em;
}

.splash-button {
    min-width: 200px;
    padding: 12px 24px;
    font-size: 1.1em;
    opacity: 1;
    transition: opacity 0.3s;
}

.splash-button:disabled {
    opacity: 0.2;
    cursor: not-allowed;
} 

/* Navbar Token Display */
.nav-token {
    width: 30px;
    height: 30px;
    background-image: url('../media/token.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 0px;
    display: inline-block;
    vertical-align: middle;
} 




/* Game Token - Most basic form */
.game-token {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 999;
    pointer-events: none;
    background-image: url('../media/token.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
} 

/* End Game Popup specific styles */
.end-game-popup {
    text-align: center;
    background-color: var(--primary-dark);
    border: 0px solid var(--primary);
    max-width: 400px;
}

.end-game-popup h2 {
    color: var(--primary);
    margin-bottom: 20px;
}

.end-game-popup p {
    margin-bottom: 30px;
    color: var(--text-light);
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.popup-buttons .nav-button:first-child {
    background-color: var(--danger);
}

.popup-buttons .nav-button:first-child:hover {
    background-color: var(--danger-dark);
} 

/* Add these to your existing styles */
.form-link {
    display: block;
    text-align: center;
    color: var(--primary);
    text-decoration: none;
    margin-top: 15px;
    font-size: 0.9em;
}

.form-link:hover {
    text-decoration: underline;
    color: var(--primary-light);
}

.error-message {
    /*background-color: var(--success);*/
    color: var(--success);
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    transition: all 0.3s ease;
}

.error-message.success {
    background-color: var(--success);
    color: var(--white);
}

.error-message.error {
    background-color: var(--error);
    color: var(--white);
} 

/* Registration Icon */
.register-icon {
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s ease;
    margin: 10px 0;
}

.register-icon:hover {
    color: var(--primary-light);
}

/* Form Links Container */
.form-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
}

/* Registration Form */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.register-form .input-group {
    margin-bottom: 10px;
}

.register-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--white);
}

.register-form input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 5px var(--primary-light);
}

/* Popup Buttons */
.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
}

.popup-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.popup-buttons button[type="submit"] {
    background-color: var(--primary);
    color: white;
}

.popup-buttons button[type="submit"]:hover {
    background-color: var(--primary-light);
}

.popup-buttons button[type="button"] {
    background-color: var(--gray-light);
    color: var(--gray-dark);
}

.popup-buttons button[type="button"]:hover {
    background-color: var(--gray-lighter);
} 

/* Popup Description Style - Ensures explicit font color for popup descriptions (W3C best practice, cross-platform) */
.popup-description {
    color: var(--white); /* Explicitly set to white for readability on dark backgrounds */
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.6;
} 

/* CORS Warning Styles - Handles cross-origin image loading issues */
.cors-warning {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.cors-warning-content {
    background: var(--white);
    color: var(--black);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cors-warning-content i {
    font-size: 48px;
    color: #ff9800;
    margin-bottom: 20px;
}

.cors-warning-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5em;
}

.cors-warning-content p {
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--black);
}

.cors-warning-content button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.cors-warning-content button:hover {
    background: var(--primary-light);
}

/* Thumbnail Placeholder Styles - Fallback for failed image loads */
.thumbnail-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.thumbnail-placeholder:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.thumbnail-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--primary);
}

/* Responsive CORS warning for mobile devices */
@media (max-width: 768px) {
    .cors-warning-content {
        margin: 20px;
        padding: 20px;
        max-width: 90vw;
    }
    
    .cors-warning-content h3 {
        font-size: 1.3em;
    }
    
    .cors-warning-content button {
        width: 100%;
        padding: 15px;
    }
}

/* CORS Thumbnail Placeholder Styles - Enhanced fallback for CORS-blocked images */
.cors-thumbnail-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px dashed #ffc107;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #856404;
    font-size: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.cors-thumbnail-placeholder:hover {
    border-color: #e0a800;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.cors-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.placeholder-title {
    font-weight: bold;
    font-size: 14px;
}

.placeholder-subtitle {
    font-size: 10px;
    opacity: 0.8;
}

.open-external-btn {
    background: #ffc107;
    color: #856404;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.open-external-btn:hover {
    background: #e0a800;
}

