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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #F2F6FA;
    color: #2B3A4A;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #E0E8F0;
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: #9AC6F3;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #5A6C7D;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #2B3A4A;
    background: #E0E8F0;
}

.nav-links a.active {
    color: #FFFFFF;
    background: #9AC6F3;
}

/* Header */
.profile-header {
    background: linear-gradient(135deg, #9AC6F3 0%, #BEE4D2 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(154, 198, 243, 0.15);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.profile-avatar:hover {
    transform: scale(1.05);
}

.avatar-edit {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(154, 198, 243, 0.95);
    padding: 4px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-avatar:hover .avatar-edit {
    opacity: 1;
}

.profile-info {
    flex: 1;
    min-width: 250px;
}

.profile-name {
    font-size: 28px;
    font-weight: 700;
    color: #2B3A4A;
    margin-bottom: 8px;
}

.profile-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #2B3A4A;
    opacity: 0.8;
}

.profile-bio {
    font-size: 14px;
    color: #2B3A4A;
    margin: 8px 0 12px 0;
    opacity: 0.9;
    font-style: italic;
}

.profile-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #2B3A4A;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.header-actions {
    margin-left: auto;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #FFFFFF;
    color: #2B3A4A;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(43, 58, 74, 0.06);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 198, 243, 0.15);
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #9AC6F3;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #5A6C7D;
    margin-top: 4px;
}

/* Main Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.section {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(43, 58, 74, 0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #2B3A4A;
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-link {
    font-size: 14px;
    color: #9AC6F3;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.edit-link:hover {
    color: #FFFFFF;
    background: #9AC6F3;
}

/* Lists */
.accessibility-list, .activity-list, .saved-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #F9FCFF;
    border-radius: 10px;
    border: 1px solid #E0E8F0;
    transition: all 0.3s ease;
}

.list-item:hover {
    border-color: #9AC6F3;
    background: #FFFFFF;
}

.item-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
}

.item-label {
    font-weight: 600;
    color: #2B3A4A;
    font-size: 14px;
}

.item-description {
    font-size: 13px;
    color: #8A9AAB;
}

.remove-btn {
    background: #FFE5E5;
    color: #D9534F;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.list-item:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    background: #D9534F;
    color: #FFFFFF;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.achievement {
    text-align: center;
    padding: 16px;
    background: #F9FCFF;
    border-radius: 12px;
    border: 2px solid #E0E8F0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.achievement.earned {
    background: linear-gradient(135deg, rgba(154, 198, 243, 0.1) 0%, rgba(190, 228, 210, 0.1) 100%);
    border-color: #A3D9B1;
}

.achievement.locked {
    opacity: 0.5;
}

.achievement:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 198, 243, 0.15);
}

.achievement-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.achievement-name {
    font-size: 12px;
    font-weight: 600;
    color: #2B3A4A;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.action-card {
    background: #FFFFFF;
    border: 2px solid #E0E8F0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.action-card:hover {
    border-color: #9AC6F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(154, 198, 243, 0.15);
}

.action-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.action-label {
    font-weight: 600;
    color: #2B3A4A;
    font-size: 14px;
}

.full-section {
    grid-column: 1 / -1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #2B3A4A;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #8A9AAB;
    line-height: 1;
    padding: 4px;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #2B3A4A;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #2B3A4A;
    margin-bottom: 8px;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E0E8F0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: #9AC6F3;
    box-shadow: 0 0 0 4px rgba(154, 198, 243, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.emoji-picker {
    margin-top: 12px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.emoji-option {
    font-size: 28px;
    padding: 10px;
    border: 2px solid #E0E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #FFFFFF;
}

.emoji-option:hover, .emoji-option.selected {
    border-color: #9AC6F3;
    background: #F9FCFF;
    transform: scale(1.05);
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    background: #F2F6FA;
    color: #2B3A4A;
}

.btn-secondary:hover {
    background: #E0E8F0;
}

.btn-danger {
    background: #FFE5E5;
    color: #D9534F;
    width: 100%;
    margin-top: 8px;
}

.btn-full {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8A9AAB;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2B3A4A;
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .header-actions {
        margin-left: 0;
        width: 100%;
    }

    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Add these styles to your profile-styles.css file */

/* Avatar Tab Buttons */
.avatar-tab {
    padding: 10px 20px;
    border: 2px solid #E0E8F0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #2B3A4A;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.avatar-tab:hover {
    border-color: #9AC6F3;
    background: #F9FCFF;
}

.avatar-tab.active {
    border-color: #9AC6F3;
    background: #9AC6F3;
    color: #FFFFFF;
}

/* Emoji Grid */
#emojiPickerContent {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

/* Image Upload Content */
#imageUploadContent {
    padding: 20px;
    text-align: center;
}

/* Profile avatar with image support */
.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}