:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.operators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.operator-card {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.operator-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-image-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    overflow: hidden;
}

.card-image-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.card-body {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .operators-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

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

.operator-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.operator-card:nth-child(1) { animation-delay: 0.1s; }
.operator-card:nth-child(2) { animation-delay: 0.2s; }
.operator-card:nth-child(3) { animation-delay: 0.3s; }
.operator-card:nth-child(4) { animation-delay: 0.4s; }
.operator-card:nth-child(5) { animation-delay: 0.5s; }
.operator-card:nth-child(6) { animation-delay: 0.6s; }

/* Icon Styling */
.header h1 i {
    margin-right: 0.75rem;
    font-size: 2.5rem;
    vertical-align: middle;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title i {
    color: var(--primary-color);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
    display: flex;
    gap: 0.5rem;
}

.card-description i {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    color: white;
}

.card-button i {
    font-size: 1.15rem;
    transition: transform 0.3s ease;
}

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

/* Back Button */
.back-button-container {
    margin-bottom: 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-4px);
    color: white;
}

/* Operator Header */
.operator-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
}

.operator-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.operator-header-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: 1rem;
}

.operator-header h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.operator-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Games Section */
.games-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--background);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.game-image-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.game-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.game-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;  /* Reduced from 0.5rem */
}

.game-codename {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.7;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}


.game-codename i {
    font-size: 0.75rem;
    opacity: 0.6;
}

.game-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

.play-button i {
    font-size: 1.1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .operator-header-content {
        flex-direction: column;
        text-align: center;
    }

    .operator-header h1 {
        font-size: 2rem;
    }

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

/* Environment Badge */
.environment-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.environment-badge i {
    font-size: 0.85rem;
}

/* DEV Environment - Orange */
.environment-dev {
    background: rgba(249, 115, 22, 0.95);
    color: white;
}

/* STAGING Environment - Yellow */
.environment-staging {
    background: rgba(234, 179, 8, 0.95);
    color: #78350f;
}

/* PROD Environment - Green */
.environment-prod {
    background: rgba(34, 197, 94, 0.95);
    color: white;
}
/* INTERNAL Environment - Green */
.environment-internal {
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Update game-card to support absolute positioning */
.game-card {
    background: var(--background);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;  /* Add this */
}

/* Config Button */
.config-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    color: var(--primary-color);
    padding: 0.6rem 1rem;
    border: 1.5px solid var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.config-button:hover {
    background: var(--primary-color);
    color: white;
}

.config-button i {
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header i {
    color: var(--primary-color);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--background);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

.modal-body pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e293b;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.modal-body code {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.copy-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--primary-color);
    padding: 0.625rem 1.25rem;
    border: 1.5px solid var(--primary-color);
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: var(--primary-color);
    color: white;
}

.modal-button {
    background: var(--primary-color);
    color: white;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-button:hover {
    background: var(--primary-hover);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-footer {
        flex-direction: column;
    }

    .copy-button,
    .modal-button {
        width: 100%;
    }
}