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

:root {
    /* Color Palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);

    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-lg: 16px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.4s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 30px;
}

.hero-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1f2937;
    box-shadow: var(--shadow-md);
}

.btn-premium:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
}

/* Free Tier Info */
.free-tier-info {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.free-tier-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 8px 0;
}

/* Progress Indicator */
.progress-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--transition);
}

.progress-step.active .step-number {
    background: var(--primary-gradient);
    color: white;
}

.step-label {
    font-size: 12px;
    color: var(--text-tertiary);
}

.progress-step.active .step-label {
    color: var(--primary-color);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 8px;
}

/* Form Styles */
.assessment-form {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Loading Screen */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 30px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-container h2 {
    margin-bottom: 24px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-steps {
    max-width: 300px;
    margin: 0 auto;
}

.loading-step {
    padding: 12px;
    margin: 8px 0;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    color: var(--text-tertiary);
    opacity: 0.5;
    transition: var(--transition);
}

.loading-step.active {
    opacity: 1;
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.02);
}

/* Card */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.card h3 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
}

/* Results Header */
.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Score Section */
.score-section {
    text-align: center;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 24px auto;
}

.score-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 18px;
    color: var(--text-tertiary);
}

.risk-level {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 16px;
    margin: 16px 0;
}

.risk-level.low {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.risk-level.moderate {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.risk-level.high {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.risk-description {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

.section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

/* Risk Breakdown */
.breakdown-item {
    margin-bottom: 24px;
}

.breakdown-item:last-child {
    margin-bottom: 0;
}

.breakdown-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.breakdown-label {
    font-weight: 600;
    font-size: 15px;
}

.breakdown-value {
    font-weight: 700;
    color: var(--primary-color);
}

.breakdown-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.breakdown-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.breakdown-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Industry Comparison */
.industry-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.industry-item:last-child {
    margin-bottom: 0;
}

.industry-name {
    font-size: 14px;
    font-weight: 500;
    min-width: 140px;
}

.industry-item.current .industry-name {
    font-weight: 700;
    color: var(--primary-color);
}

.industry-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.industry-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-out;
}

.industry-score {
    font-weight: 700;
    min-width: 30px;
    text-align: right;
}

/* Tips List */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tip-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.tip-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.tip-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.tip-content h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.tip-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Premium Content */
.premium-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1f2937;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.premium-content.locked {
    position: relative;
    min-height: 200px;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.locked-overlay p {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 300px;
}

/* Skill Analysis */
.skill-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.skill-item:last-child {
    margin-bottom: 0;
}

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

.skill-name {
    font-weight: 600;
    font-size: 15px;
}

.skill-safety {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.skill-safety.safe {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.skill-safety.risk {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.skill-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-bar-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 90px;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease-out;
}

.skill-bar-value {
    font-size: 13px;
    font-weight: 600;
    min-width: 35px;
    text-align: right;
}

/* Learning Path */
.learning-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.learning-item:last-child {
    margin-bottom: 0;
}

.learning-item h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.learning-item ul {
    list-style: none;
    padding: 0;
}

.learning-item li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
}

.learning-item li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* Career Pivots */
.pivot-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    transition: var(--transition);
}

.pivot-item:last-child {
    margin-bottom: 0;
}

.pivot-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.pivot-icon {
    font-size: 24px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.pivot-content h4 {
    font-size: 16px;
    margin-bottom: 6px;
}

.pivot-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Salary Forecast */
.forecast-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    margin: 24px 0;
    padding: 0 16px;
}

.forecast-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.forecast-fill {
    width: 40px;
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
    transition: height 1s ease-out;
}

.forecast-fill.low {
    background: var(--success-color);
}

.forecast-fill.medium {
    background: var(--warning-color);
}

.forecast-fill.high {
    background: var(--danger-color);
}

.forecast-value {
    font-size: 12px;
    font-weight: 700;
    color: white;
}

.forecast-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.forecast-note {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

/* Timeline Prediction */
.timeline-display {
    text-align: center;
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
}

.timeline-display.low {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
}

.timeline-display.medium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.2));
}

.timeline-display.high {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.2));
}

.timeline-years {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.timeline-label {
    font-size: 20px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 8px;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

/* Unlock Section */
.unlock-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.unlock-content h3 {
    color: white;
    margin-bottom: 12px;
}

.unlock-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.premium-features-list {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.premium-features-list li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
}

.premium-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
}

.price-currency {
    font-size: 18px;
    opacity: 0.9;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

/* Assessments Counter */
.assessments-counter {
    text-align: center;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    margin: 24px 0;
}

.assessments-counter p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* Ad Container */
.ad-container {
    margin-top: 24px;
}

.ad-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
}

.ad-placeholder p {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 20px;
    }

    .score-circle {
        width: 180px;
        height: 180px;
    }

    .score-number {
        font-size: 48px;
    }

    .timeline-years {
        font-size: 56px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: slideInUp 0.4s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }

/* Dark mode support for Telegram */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-tertiary: #9ca3af;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        --border-color: #374151;
    }

    .locked-overlay {
        background: rgba(31, 41, 55, 0.95);
    }

    .form-group input,
    .form-group select {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }
}
