:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --warning: #f72585;
    --gray: #adb5bd;
    --gray-dark: #495057;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7ff;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--gray-dark);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.app-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.tabs {
    display: flex;
    background: var(--light);
    border-bottom: 1px solid #e9ecef;
}

.tab {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-dark);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    background: rgba(67, 97, 238, 0.05);
}

.tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.03);
}

.tab-content {
    display: none;
    padding: 2rem;
}

.tab-content.active {
    display: block;
}

.input-section {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    font-size: 1rem;
    transition: border 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    border: 1px solid var(--gray);
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: none;
}

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.results-section {
    background: var(--light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.score-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--primary);
}

.score-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.score-description {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.score-card.warning {
    border-top-color: var(--warning);
}

.score-card.warning .score-value {
    color: var(--warning);
}

.score-card.success {
    border-top-color: var(--success);
}

.score-card.success .score-value {
    color: var(--success);
}

.text-stats {
    margin-top: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-dark);
}

.suggestions {
    margin-top: 2rem;
}

.suggestion-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary);
}

.suggestion-card h3 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-card p {
    color: var(--gray-dark);
}

.history-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-item h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.history-item p {
    color: var(--gray-dark);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.history-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-dark);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-left: 0.3rem;
}

.tooltip i {
    color: var(--primary-light);
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--dark);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: normal;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}