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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #4a5568;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: #718096;
    font-size: 1.2em;
}

.back-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #3182ce;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-container, .success-container, .error-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.form-container h2 {
    color: #4a5568;
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
}

.recommendation-form {
    max-width: 500px;
    margin: 0 auto;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.sample-users {
    margin-top: 30px;
    text-align: center;
}

.sample-users h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.users-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 15px;
}

.user-tag, .user-link {
    padding: 8px 15px;
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #4a5568;
    font-size: 14px;
}

.user-tag:hover, .user-link:hover {
    background: #4299e1;
    color: white;
    transform: translateY(-2px);
}

.help-text {
    color: #718096;
    font-size: 14px;
}

.info-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-section h3 {
    color: #4a5568;
    margin-bottom: 20px;
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: #4299e1;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.user-info {
    text-align: center;
    margin-bottom: 30px;
}

.user-info h2 {
    color: #4a5568;
    margin-bottom: 10px;
}

.username {
    color: #4299e1;
    font-weight: bold;
}

.stats {
    color: #718096;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.recommendation-card {
    display: flex;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.rank-badge {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-right: 25px;
    flex-shrink: 0;
}

.product-info {
    flex: 1;
}

.product-name {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2em;
    line-height: 1.4;
}

.sentiment-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.percentage, .review-count {
    text-align: center;
}

.percentage-value, .count-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #4299e1;
}

.percentage-label, .count-label {
    display: block;
    font-size: 0.9em;
    color: #718096;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 4px;
    transition: width 1s ease;
}

.error-container {
    text-align: center;
}

.error-message {
    margin-bottom: 30px;
}

.error-message h2 {
    color: #e53e3e;
    margin-bottom: 15px;
}

.error-message p {
    color: #718096;
    font-size: 1.1em;
}

.available-users {
    margin-bottom: 30px;
}

.available-users h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.help-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.help-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.help-section ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
    color: #718096;
}

.help-section li {
    margin-bottom: 8px;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn.primary {
    background: #4299e1;
    color: white;
}

.action-btn.secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.summary {
    background: #f7fafc;
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
}

.summary h3 {
    color: #4a5568;
    margin-bottom: 15px;
}

.summary p {
    color: #718096;
    line-height: 1.6;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2em;
    }

    .form-container, .success-container, .error-container {
        padding: 25px;
    }

    .sentiment-stats {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .recommendation-card {
        flex-direction: column;
        text-align: center;
    }

    .rank-badge {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }

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