 /* Profile Page Styles */
.profile-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.avatar-wrapper {
    position: relative;
    margin-right: 30px;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #159895;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: #159895;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-name {
    font-size: 2.2rem;
    margin: 0 0 5px 0;
    color: #333;
}

.profile-email {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 15px 0;
}

.profile-meta {
    display: flex;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
    color: #159895;
    margin-right: 20px;
    width: 50px;
    height: 50px;
    background: #e8f7f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    display: block;
    color: #333;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Graph Section */
.graph-section,
.progress-section, .progressOverviewModal {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.settings-container {
    background: transparent;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.4s ease-out;
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}

.setting-item, .setting-action-item {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.setting-item:last-child, .setting-action-item:last-child {
    border-bottom: none;
}

.setting-action-item {
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
}

.setting-action-item:hover {
    background-color: #f9f9f9;
}

.setting-action-item:active {
    background-color: #f0f0f0;
}

.setting-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0f7f7;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 18px;
    flex-shrink: 0;
}

.setting-icon.security { background: #fff4e6; color: #fd7e14; }
.setting-icon.app { background: #e7f5ff; color: #228be6; }
.setting-action-item.logout .setting-icon { background: #f8f9fa; color: #495057; }
.setting-action-item.delete .setting-icon { background: #fff5f5; color: #fa5252; }

.setting-info {
    flex-grow: 1;
}

.setting-name, .setting-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 2px;
}

.setting-description {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

.arrow-icon {
    color: #ccc;
    font-size: 0.9rem;
    margin-left: 15px;
}

.setting-action-item:hover .arrow-icon {
    color: var(--primary-color);
    transform: translateX(3px);
    transition: all 0.2s ease;
}

.setting-control input {
    max-width: 100px;
    border-radius: 8px;
    text-align: center;
}
.section-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin: 11px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.graph-container {
    height: 300px;
    width: 100%;
    position: relative;
}

.configpagebg {
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    top: 0;
    left: 0;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.confirmation-modal {
    background-color: #ffffff;
    border: none;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    max-width: 450px;
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.confirmation-modal input{
    width: 100%;
    border-radius: 5px;
    margin-bottom: 7px;
    outline: 1px solid #ddd;
}

/* Scores Section */
.score-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.score-header {
    display: flex;
    background: #159895;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
}

.score-col {
    flex: 1;
    padding: 5px;
}

.score-body {
    max-height: 400px;
    overflow-y: auto;
}

.score-row {
    display: flex;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.score-row:last-child {
    border-bottom: none;
}
.switchingTab {
    margin: 3px;
    background-color: transparent;
    padding: 5px 0px;
}
.pf-tab-btn {
    padding: 5px 20px;
    background: #fff;
    border: none;
    border-bottom: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.5s;
}
.pf-tab-btn:hover {
    background: #f0f0f0;
    border-bottom: 2px solid #159895;
}
.pf-tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #159895;
}

/* --- DARK THEME OVERRIDES --- */
body[data-theme="dark"] .graph-section,
body[data-theme="dark"] .settings-container,
body[data-theme="dark"] .progress-section,
body[data-theme="dark"] .progressOverviewModal,
body[data-theme="dark"] .profile-header,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .score-table,
body[data-theme="dark"] .settings-card {
    background: #23272b;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: #333;
}

body[data-theme="dark"] .setting-item,
body[data-theme="dark"] .setting-action-item {
    border-bottom-color: #333;
}

body[data-theme="dark"] .setting-action-item:hover {
    background-color: #2d3238;
}

body[data-theme="dark"] .setting-name,
body[data-theme="dark"] .setting-label {
    color: #eee;
}

body[data-theme="dark"] .setting-description {
    color: #999;
}

body[data-theme="dark"] .setting-icon {
    background: #1e2124;
}

body[data-theme="dark"] .profile-name,
body[data-theme="dark"] .stat-value,
body[data-theme="dark"] .section-title {
    color: #fff;
}

body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .profile-email,
body[data-theme="dark"] .meta-item {
    color: #aaa;
}

body[data-theme="dark"] .confirmation-modal {
    background-color: #181a1b;
    border-color: #444;
    color: #e0e0e0;
}

body[data-theme="dark"] .confirmation-modal input {
    background-color: #23272b;
    color: #e0e0e0;
    border: 1px solid #555;
    outline: none;
}

body[data-theme="dark"] .pf-tab-btn {
    background: #23272b;
    color: #e0e0e0;
    border-bottom-color: #23272b;
}

body[data-theme="dark"] .pf-tab-btn:hover {
    background: #2d3a3a;
    color: #1bcfcf;
    border-bottom-color: #1bcfcf;
}

body[data-theme="dark"] .pf-tab-btn.active {
    background: #2d3a3a;
    color: #1bcfcf;
    border-bottom-color: #1bcfcf;
}

body[data-theme="dark"] .form-select {
    background-color: #23272b;
    color: #e0e0e0;
    border-color: #555;
}

body[data-theme="dark"] .score-row {
    border-bottom-color: #333;
}

body[data-theme="dark"] .stat-icon {
    background: #181a1b;
    color: #1bcfcf;
}

/* Responsive Design */
@media (max-width: 768px) {
    .configpagebg {
        padding: 7%;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .avatar-wrapper {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .profile-meta {
        justify-content: center;
    }

    .score-header {
        display: none;
    }

    .score-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .score-col {
        width: 100%;
    }

    .score-col::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
        color: #159895;
    }
}
