@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    padding: 20px;
    direction: rtl;
    color: #1e293b;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #666;
    font-size: 1.1em;
    font-style: italic;
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-btn {
    padding: 12px 24px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.nav-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.user-selector {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    color: white;
}

.user-selector label {
    display: block;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

.user-selector select {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    background: white;
    color: #333;
    cursor: pointer;
}

.personal-link {
    margin-bottom: 30px;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 10px;
    border-right: 5px solid #4caf50;
}

.personal-link p {
    margin-bottom: 10px;
    font-weight: bold;
    color: #2e7d32;
}

.personal-link input {
    width: calc(100% - 120px);
    padding: 10px;
    border: 2px solid #4caf50;
    border-radius: 8px;
    margin-left: 10px;
    font-size: 0.9em;
}

.personal-link button {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.personal-link button:hover {
    background: #45a049;
    transform: scale(1.05);
}

/* Form Sections */
.form-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid #667eea;
    transition: all 0.3s ease;
}

.form-section:hover {
    background: #e8eaf6;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.form-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.radio-group,
.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-group label,
.checkbox-group label {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.radio-group label:hover,
.checkbox-group label:hover {
    border-color: #667eea;
    background: #f3f4ff;
}

.radio-group input[type="radio"]:checked+label,
.checkbox-group input[type="checkbox"]:checked+label,
.radio-group label:has(input:checked),
.checkbox-group label:has(input:checked) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

input[type="radio"],
input[type="checkbox"] {
    margin-left: 5px;
}

/* Submit Section */
.submit-section {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    padding: 15px 50px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.6);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.stat-card h3 {
    font-size: 1.2em;
    margin-bottom: 15px;
    opacity: 0.9;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1em;
    opacity: 0.8;
}

/* Leaderboard */
.leaderboard {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.leaderboard h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th,
td {
    padding: 15px;
    text-align: center;
}

tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Chart Container */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-container h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* User History */
.user-history {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.history-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 4px solid #667eea;
}

.history-item h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.history-item .score {
    font-size: 2em;
    font-weight: bold;
    color: #4caf50;
    margin: 10px 0;
}

.history-item .level {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 20px;
    font-weight: bold;
}

/* Weakness Analysis */
.weakness-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.weakness-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.weakness-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.weakness-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #fff3e0;
    border-radius: 8px;
    border-right: 4px solid #ff9800;
}

.weakness-item .activity-name {
    font-weight: bold;
    color: #e65100;
    margin-bottom: 5px;
}

.weakness-item .score {
    color: #666;
}

/* Reports */
.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #f3f4ff;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.report-content {
    display: none;
}

.report-content.active {
    display: block;
}

/* Placeholder */
.placeholder {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.2em;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .main-nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .personal-link input {
        width: 100%;
        margin: 10px 0;
    }

    .personal-link button {
        width: 100%;
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 30px 50px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(76, 175, 80, 0.5);
    font-size: 1.5em;
    font-weight: bold;
    z-index: 1000;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #f44336;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:active {
    transform: scale(0.95);
}

/* Modal List */
.modal-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.modal-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.modal-list-item:hover {
    background: #f9f9f9;
}

.modal-list-item:last-child {
    border-bottom: none;
}