/* ===================== LOADING SPINNER ===================== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top: 5px solid #21a300;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    margin-top: 20px;
    color: #21a300;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
}

.loading-spinner.hidden {
    display: none;
}

/* ===================== PROFILE PAGE LAYOUT ===================== */
.profile-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.profile-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 900px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInFromBottom 0.8s ease;
    opacity: 0;
    animation-fill-mode: forwards;
}

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

/* ===================== PROFILE HEADER ===================== */
.profile-header {
    text-align: center;
    padding: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
    animation: fadeInDown 1s ease 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

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

.profile-avatar {
    margin-bottom: 20px;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #41ed3b 0%, #099f04 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(33, 163, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(33, 163, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(33, 163, 0, 0.5);
    }
}

.avatar-circle span {
    font-size: 48px;
    color: white;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.profile-header h1 {
    color: #333;
    font-size: 36px;
    margin-bottom: 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.profile-role {
    color: #21a300;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    background: rgba(33, 163, 0, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}

/* ===================== PROFILE DETAILS ===================== */
.profile-details {
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.5s;
    opacity: 0;
    animation-fill-mode: forwards;
}

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

.profile-details h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #21a300;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.detail-item {
    background: rgba(33, 163, 0, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(33, 163, 0, 0.2);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(33, 163, 0, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(33, 163, 0, 0.2);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    display: block;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item p {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    word-wrap: break-word;
}

/* ===================== QUICK ACTIONS ===================== */
.quick-actions {
    animation: fadeInUp 0.8s ease 0.7s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.quick-actions h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #21a300;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.action-btn {
    background: linear-gradient(135deg, #41ed3b 0%, #099f04 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(33, 163, 0, 0.3);
}

.action-btn span {
    font-size: 32px;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(33, 163, 0, 0.4);
}

.action-btn:active {
    transform: translateY(-2px);
}

/* ===================== LOGOUT BUTTON ===================== */
#logoutBtn {
    background: transparent;
    color: #21a300;
    border: 2px solid #21a300;
}

#logoutBtn:hover {
    background-color: #21a300;
    color: white;
}

/* ===================== RESPONSIVE DESIGN ===================== */
@media (max-width: 768px) {
    .profile-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .profile-header h1 {
        font-size: 28px;
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
    }

    .avatar-circle span {
        font-size: 40px;
    }

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

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .profile-details h2,
    .quick-actions h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .profile-page {
        padding: 20px 10px;
    }

    .profile-container {
        padding: 25px 15px;
    }

    .profile-header h1 {
        font-size: 24px;
    }

    .profile-role {
        font-size: 16px;
    }

    .detail-item {
        padding: 15px;
    }

    .action-btn {
        padding: 15px;
    }
}