/* ==========================================================================
   PROFILE PAGE STYLES - SUBTLE CRIMSON CHECKER THEME
   ========================================================================== */

body.profile-page {
    font-family: var(--font-main);
    background-color: #030712;
    background-image: 
        linear-gradient(45deg, rgba(127, 29, 29, 0.12) 25%, transparent 25%), 
        linear-gradient(-45deg, rgba(127, 29, 29, 0.12) 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, rgba(127, 29, 29, 0.12) 75%), 
        linear-gradient(-45deg, transparent 75%, rgba(127, 29, 29, 0.12) 75%),
        radial-gradient(circle at 50% 20%, rgba(153, 27, 27, 0.15) 0%, transparent 70%);
    background-size: 32px 32px, 32px 32px, 32px 32px, 32px 32px, 100% 100%;
    background-position: 0 0, 0 16px, 16px -16px, -16px 0, 0 0;
    color: #f1f5f9;
}

.profile-container {
    max-width: 850px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
}

/* Warning Box */
.profile-warning-box {
    background: rgba(127, 29, 29, 0.35);
    border: 1px solid #ef4444;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.profile-warning-box .warning-icon {
    font-size: 1.8rem;
    color: #ef4444;
}

.profile-warning-box strong {
    color: #f8fafc;
    font-size: 1.05rem;
}

.profile-warning-box p {
    margin: 4px 0 0 0;
    color: #fca5a5;
    font-size: 0.9rem;
    line-height: 1.4;
}

.profile-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(153, 27, 27, 0.4);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(127, 29, 29, 0.15);
    backdrop-filter: blur(10px);
}

.profile-header-block {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(153, 27, 27, 0.25);
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.profile-avatar-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #0d1322;
    border: 2px solid #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 1.8rem;
    box-shadow: 0 0 10px rgba(153, 27, 27, 0.3);
}

.profile-title-area h1 {
    margin: 0 0 4px 0;
    font-size: 1.8rem;
    color: #f8fafc;
}

.profile-title-area p {
    margin: 0;
    color: #f87171;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.detail-item {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(153, 27, 27, 0.3);
    padding: 18px 20px;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-item:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(153, 27, 27, 0.2);
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #f87171;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 700;
}

.detail-value {
    font-size: 1.05rem;
    color: #f1f5f9;
    word-break: break-all;
    font-weight: 500;
}

/* Location Form Block */
.location-form-block {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(153, 27, 27, 0.25);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.req {
    color: #ef4444;
}

.profile-input {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(153, 27, 27, 0.5);
    border-radius: 6px;
    padding: 10px 14px;
    color: #f8fafc;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.profile-input:focus {
    border-color: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.form-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-save {
    background-color: #0e9489;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-save:hover {
    background-color: #10b981;
    transform: translateY(-2px);
}

.save-msg {
    font-size: 0.88rem;
    font-weight: 600;
}

.profile-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.btn-crimson-danger {
    background-color: #7f1d1d;
    color: #ffffff;
    border: 1px solid #991b1b;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-crimson-danger:hover {
    background-color: #991b1b;
    box-shadow: 0 0 10px rgba(153, 27, 27, 0.4);
    transform: translateY(-2px);
}

/* ---- Stats ---- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stat-card {
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(153, 27, 27, 0.35);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 12px rgba(153, 27, 27, 0.25);
}

.stat-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #f87171;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f8fafc;
}

.stat-value.streak-value {
    color: #f59e0b;
}

/* ---- Sections ---- */
.profile-section {
    margin-top: 34px;
}

.profile-section-title {
    font-size: 1.25rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(153, 27, 27, 0.3);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.profile-section-title i {
    color: #ef4444;
}

/* ---- Badges ---- */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.badge-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(153, 27, 27, 0.3);
    border-radius: 10px;
    padding: 20px 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.badge-card.unlocked {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.12);
}

.badge-card.locked {
    opacity: 0.45;
    filter: grayscale(0.7);
}

.badge-icon {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 10px;
}

.badge-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
    margin-bottom: 5px;
}

.badge-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

.badge-meta {
    font-size: 0.74rem;
}

.badge-date {
    color: #34d399;
}

.badge-locked-label {
    color: #64748b;
}

.badges-empty {
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed rgba(153, 27, 27, 0.3);
    padding: 24px;
    border-radius: 10px;
    text-align: center;
}

/* ---- Certificates ---- */
.certificates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certificate-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(153, 27, 27, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.certificate-item:hover {
    border-color: rgba(250, 204, 21, 0.5);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.15);
    transform: translateY(-2px);
}

.certificate-item-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: rgba(250, 204, 21, 0.12);
    border: 1px solid rgba(250, 204, 21, 0.45);
    color: #facc15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.certificate-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.certificate-item-title {
    font-weight: 700;
    color: #f8fafc;
    font-size: 1.02rem;
}

.certificate-item-date {
    font-size: 0.8rem;
    color: #94a3b8;
}

.certificate-item-arrow {
    color: #64748b;
}

/* Event Participation Styles */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(153, 27, 27, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.event-item:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.event-item-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.event-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-item-title {
    font-weight: 700;
    color: #f8fafc;
    font-size: 1.05rem;
}

.event-item-sub {
    font-size: 0.85rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.events-empty {
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.4);
    border: 1px dashed rgba(153, 27, 27, 0.3);
    padding: 24px;
    border-radius: 10px;
    text-align: center;
}