/* ========== ADMIN STYLES ========== */
/* Admin page specific styles */

/* ========== PAGE LAYOUT ========== */

.admin-page {
    background: linear-gradient(180deg, #0f2027 0%, #1a472a 50%, #2d5a3d 100%);
}

.admin-container {
    max-width: 800px;
    margin: 0 auto;
}

.admin-page h1 {
    color: var(--white);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.3), 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
    margin-bottom: 20px;
}

.admin-page .back-btn {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}

.admin-page .back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========== CARDS ========== */

.admin-page .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ========== TABS ========== */

.admin-page .tabs {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    margin-bottom: 20px;
}

.admin-page .tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-page .tab:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.admin-page .tab.active {
    background: var(--white);
    color: var(--secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ========== PLAYER LIST ========== */

.player-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.player-item:hover {
    background: #e8e8e8;
}

.player-name {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ========== IMAGE EDITOR ========== */

.image-editor {
    border: 2px solid var(--secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.image-editor-photo {
    position: relative;
    cursor: crosshair;
}

.image-editor-photo img {
    width: 100%;
    display: block;
    pointer-events: none;
}

.image-editor-photo .hotspot-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    pointer-events: auto;
    z-index: 10;
    cursor: grab;
}

.image-editor-photo .hotspot-marker:active {
    cursor: grabbing;
}

.image-editor-controls {
    padding: 12px;
    background: var(--gray);
}

/* ========== HOTSPOT LIST ========== */

.hotspot-list {
    margin-bottom: 12px;
}

.hotspot-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.hotspot-item .hotspot-marker-small {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 6px;
}

.hotspot-item .hotspot-clue {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
    padding: 8px;
}

.hotspot-item .hotspot-difficulty {
    flex: 0 0 auto;
    width: auto;
    padding: 6px 8px;
    border-radius: 6px;
    border: 2px solid #ddd;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.hotspot-item .delete-hotspot {
    flex-shrink: 0;
    margin-top: 4px;
}

/* ========== SEQUENCE EDITOR ========== */

.sequence-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    background: var(--gray);
    border-radius: 8px;
    margin-bottom: 10px;
}

.sequence-item select {
    margin-bottom: 0;
}

.sequence-number {
    width: 30px;
    height: 30px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* ========== PLAYER EDITOR ========== */

.player-editor {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.player-editor .player-name-input {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.player-editor .player-difficulty {
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #ddd;
    margin-bottom: 0;
    max-width: 100px;
}

/* ========== EXPORT SECTION ========== */

.export-section {
    background: var(--gray);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.export-section textarea {
    font-family: monospace;
    font-size: 12px;
    height: 200px;
}

.admin-page .export-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
}

.admin-page .export-section h3 {
    color: var(--white);
}

.admin-page .export-section p {
    color: rgba(255, 255, 255, 0.8);
}

.admin-page .export-section textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.admin-page .export-section textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* ========== QR MODAL ========== */

.qr-modal {
    justify-content: center;
    align-items: center;
}

.qr-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    z-index: 10;
}

.qr-modal-content {
    text-align: center;
}

.qr-modal-title {
    color: white;
    margin-bottom: 20px;
}

.qr-modal-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    display: inline-block;
}

/* ========== MANUAL CODE DISPLAY ========== */

.manual-code {
    margin-top: 16px;
}

.manual-code-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.manual-code-value {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 8px;
    color: #1a472a;
    font-family: monospace;
}

/* ========== PASSWORD SCREEN ========== */

.password-card {
    margin-top: 80px;
}

.password-error {
    color: var(--primary);
    margin-top: 12px;
}

.admin-page .password-card {
    max-width: 350px;
    margin: auto;
}

/* ========== RESPONSIVE ========== */

@media (min-width: 768px) {
    .player-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .player-item {
        margin-bottom: 0;
    }

    .export-section textarea {
        height: 300px;
    }

    .qr-modal-box {
        padding: 40px;
    }
}

@media (min-width: 1024px) {
    .player-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .player-editor {
        flex-wrap: nowrap;
    }

    .player-editor .player-name-input {
        min-width: 200px;
    }
}
