* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.3);
    --border-radius: 20px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    animation: fadeInDown 0.5s ease;
}

.header h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .profile-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.5s ease;
    margin-bottom: 20px;
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    color: #333;
    text-decoration: none;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    border-color: #4285F4;
    background: #f8f9ff;
}

.apple-btn {
    background: #000;
    color: white;
    border-color: #000;
}

.apple-btn:hover {
    background: #333;
    border-color: #333;
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 15px;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: bold;
    margin: 0 auto 15px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.profile-header h2 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.8rem;
}

.user-email {
    color: #666;
    font-size: 0.95rem;
}

/* Progress Section */
.progress-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-header h3 {
    color: #333;
    font-size: 1.3rem;
    margin: 0;
}

.progress-text {
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 2px solid #f0f0f0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Trophies Section */
.trophies-section {
    margin-bottom: 25px;
}

.trophies-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.trophies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.trophy-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 3px solid;
    transition: var(--transition);
    cursor: default;
}

.trophy-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.trophy-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.trophy-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.no-trophies {
    text-align: center;
    color: #999;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    font-style: italic;
}

/* Actions Section */
.actions-section {
    border-top: 2px solid #f0f0f0;
    padding-top: 25px;
}

.actions-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.actions-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
}

.btn-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.btn-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.btn-text strong {
    display: block;
    font-size: 1rem;
}

.btn-text small {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.logout-btn {
    margin-top: 10px;
}

/* Messages */
.error-message, .success-message {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

.modal-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-content ul {
    color: #666;
    margin-left: 20px;
    margin-bottom: 15px;
    line-height: 1.8;
}

.confirm-text {
    font-weight: 600;
    color: #333;
    margin-top: 20px;
}

.confirm-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    transition: var(--transition);
}

.confirm-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }

    .card, .profile-card {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .trophies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .trophy-card {
        padding: 12px;
    }

    .trophy-icon {
        font-size: 2rem;
    }

    .trophy-name {
        font-size: 0.75rem;
    }

    .modal-content {
        padding: 20px;
    }

    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .card, .profile-card {
        padding: 15px;
        border-radius: 15px;
    }

    .avatar, .avatar-placeholder {
        width: 100px;
        height: 100px;
    }

    .avatar-placeholder {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        padding: 12px;
    }

    .stat-icon {
        font-size: 1.8rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .trophies-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-btn {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .btn-text {
        text-align: center;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
