/* THE HIVE - Admin Panel Styles */

:root {
    --primary-pink: #e91e8c;
    --primary-purple: #8b3dff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-green: #10b981;
    --error-red: #dc2626;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
}

.logo {
    height: 100px;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.login-container h1 {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
    margin-bottom: 40px;
}

.login-form {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 15px 18px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(139, 61, 255, 0.1);
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 6px;
    font-style: italic;
}

.btn {
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 61, 255, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 61, 255, 0.4);
}

.error-message {
    margin-top: 20px;
    padding: 12px 18px;
    background: #fee2e2;
    color: var(--error-red);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.back-link {
    display: inline-block;
    margin-top: 30px;
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary-pink);
}

/* Admin Panel Screen */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    margin-bottom: 50px;
}

.header-content {
    background: white;
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo-small {
    height: 60px;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.header .subtitle {
    margin: 0;
}

.btn-logout {
    background: white;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    padding: 12px 24px;
    white-space: nowrap;
}

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

/* Message Box */
.message-box {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 500px;
}

.spinner {
    border: 4px solid rgba(139, 61, 255, 0.1);
    border-left-color: var(--primary-purple);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Profiles List */
.profiles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.profile-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.profile-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 61, 255, 0.12);
}

.profile-item.has-data {
    border: 2px solid var(--success-green);
}

.profile-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
}

.profile-image-small {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--border-color);
}

.profile-name-small {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.profile-role-small {
    font-size: 13px;
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.3;
    min-height: 36px;
}

.profile-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 12px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.meta-label {
    color: var(--text-gray);
    font-weight: 600;
}

.meta-value {
    font-weight: 700;
    color: var(--text-dark);
}

.meta-value.has {
    color: var(--success-green);
}

.meta-value.missing {
    color: var(--error-red);
}

.btn-edit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(139, 61, 255, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 61, 255, 0.4);
}

/* Modal */
.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(5px);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h2 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--primary-pink);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

/* Scores Section */
.scores-section {
    margin-top: 30px;
}

.scores-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.score-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.score-input-group label {
    font-size: 11px;
    margin: 0;
}

.score-input-group input {
    padding: 10px 12px;
    font-size: 14px;
}

/* Form Actions */
.form-actions {
    margin-top: 35px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-pink), var(--primary-purple));
    color: white;
    box-shadow: 0 4px 12px rgba(139, 61, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 61, 255, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px 10px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 25px;
    }

    .logo-small {
        height: 50px;
    }

    .header h1 {
        font-size: 26px;
    }

    .btn-logout {
        width: 100%;
    }

    .profiles-list {
        grid-template-columns: 1fr;
    }

    .score-inputs {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    .modal-content {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .login-container h1 {
        font-size: 30px;
    }

    .login-form {
        padding: 30px 25px;
    }

    .header h1 {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }
}
