/* ============================================
   Admin Panel Styles
   ============================================ */

/* Auth Section */
.auth-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.auth-section h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--dark);
}

/* Admin Section */
.admin-section {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    background: var(--gray-light);
    padding: 0;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    border: none;
    background: transparent;
    color: var(--gray);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary);
    background: white;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.tab-btn.logout-btn {
    color: var(--error);
    margin-left: auto;
}

.tab-btn.logout-btn:hover {
    color: white;
    background: var(--error);
}

/* Tab Content */
.tab-content {
    padding: 40px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--dark);
}

/* Games List */
.games-list {
    display: grid;
    gap: 20px;
}

.game-card {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

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

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 10px;
}

.game-card h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.game-card-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: var(--gray);
}

.game-card-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

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

.btn-copy:hover {
    background: var(--primary-dark);
}

.btn-delete {
    background: var(--error);
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
}

.game-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: var(--dark);
    word-break: break-all;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Settings */
.setting-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.setting-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    border-radius: 28px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    padding: 0 3px;
}

.toggle label:after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked+label {
    background-color: var(--success);
}

.toggle input:checked+label:after {
    left: calc(100% - 25px);
}

.toggle~span {
    font-weight: 600;
}

/* Info Box */
.info-box {
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.8;
}

.info-box pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Danger Zone */
.btn-danger {
    background: var(--error);
    color: white;
    padding: 12px 24px;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Logout Section */
.logout-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.logout-section h2 {
    color: var(--gray);
}

.logout-section a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-tabs {
        gap: 0;
    }

    .tab-btn {
        flex: 0 1 auto;
        min-width: 100px;
        padding: 12px 16px;
        font-size: 0.85rem;
    }

    .tab-content {
        padding: 20px;
    }

    .game-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-control {
        flex-direction: column;
        align-items: flex-start;
    }
}