/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    position: relative;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.user-info {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* Main Content */
.main-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 2rem;
}

/* Section Styles */
.stats-section,
.radar-section,
.topics-section,
.activity-section,
.motivation-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.8s ease;
    width: 0%;
}

/* Radar Chart Section */
.radar-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.radar-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

#radar-chart {
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
}

.radar-labels {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.radar-label {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Topics Section */
.topics-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.topics-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.2s ease;
}

.topic-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateX(4px);
}

.topic-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    color: white;
}

.topic-info {
    flex: 1;
}

.topic-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.topic-stats {
    font-size: 0.9rem;
    color: #718096;
}

.topic-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.topic-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.8s ease;
}

/* Activity Section */
.activity-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.activity-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border-left: 4px solid #48bb78;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(4px);
}

.activity-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-radius: 8px;
    color: white;
}

.activity-info {
    flex: 1;
}

.activity-topic {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.activity-details {
    font-size: 0.9rem;
    color: #718096;
}

.activity-score {
    font-weight: 600;
    color: #48bb78;
}

/* Motivation Section */
.motivation-section {
    text-align: center;
}

.motivation-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.motivation-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.motivation-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    line-height: 1.5;
}

/* No Data State */
.no-data {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1rem;
    color: #718096;
    font-weight: 500;
}

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

/* Responsive Design */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-content {
        padding: 0 2rem;
    }

    .main-content {
        padding: 2rem;
    }

    .title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.75rem;
    }

    .title {
        font-size: 1.25rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .radar-section,
    .topics-section,
    .activity-section,
    .motivation-section {
        padding: 1.5rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .header {
        background: rgba(26, 32, 44, 0.95);
    }

    .title {
        color: #e2e8f0;
    }

    .user-info {
        color: #a0aec0;
    }

    .stat-card,
    .radar-section,
    .topics-section,
    .activity-section,
    .motivation-card {
        background: rgba(26, 32, 44, 0.95);
        color: #e2e8f0;
    }

    .stat-label,
    .activity-details,
    .topic-stats {
        color: #a0aec0;
    }

    .stat-value,
    .topic-name,
    .activity-topic {
        color: #e2e8f0;
    }

    .progress-bar {
        background: #4a5568;
    }

    .topic-progress {
        background: #4a5568;
    }

    .activity-item {
        background: rgba(26, 32, 44, 0.8);
    }

    .no-data {
        background: rgba(26, 32, 44, 0.5);
        color: #718096;
        border-color: #4a5568;
    }
}
