:root {
    --bg-main: #0D1117;
    --bg-card: #161B22;
    --bg-hover: #21262d;
    --border-color: #30363d;

    --text-main: #E6EDF3;
    --text-muted: #8B949E;

    /* Primary Requirements */
    --primary: #00B894;
    --secondary: #FDCB6E;
    --accent-red: #E17055;

    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Strength Colors */
    --score-0: #ff4d4d;
    /* Red */
    --score-1: #ff793f;
    /* Orange */
    --score-2: #FDCB6E;
    /* Yellow/Secondary */
    --score-3: #1dd1a1;
    /* Light Green */
    --score-4: #00B894;
    /* Dark Green/Primary */
}

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

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 680px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Input Area */
.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

input[type="password"],
input[type="text"] {
    flex: 1;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 1.25rem;
    padding: 1rem;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15);
}

.icon-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
    background: var(--bg-hover);
}

/* Strength Meter */
.strength-meter-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.strength-meter {
    height: 8px;
    background: var(--bg-main);
    border-radius: 4px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0%;
    background-color: var(--score-0);
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.stat-card.highlight {
    border-color: rgba(0, 184, 148, 0.3);
    position: relative;
    overflow: hidden;
}

.stat-card.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.stat-header h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.types-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.char-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-family: var(--font-mono);
    border: 1px solid var(--border-color);
}

.char-badge.active {
    background: rgba(0, 184, 148, 0.1);
    color: var(--primary);
    border-color: rgba(0, 184, 148, 0.3);
}

/* Feedback */
.feedback-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.panel-section {
    padding: 1.5rem;
}

.warning-section {
    background: rgba(225, 112, 85, 0.05);
    /* Accent Red */
    border-bottom: 1px solid rgba(225, 112, 85, 0.1);
    color: #ff9f87;
}

.flex-align {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.suggestions-section h3 {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.suggestions-section ul {
    list-style: none;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.suggestions-section li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.suggestions-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary);
}

.suggestions-section li.empty-state {
    padding-left: 0;
    font-style: italic;
    color: var(--text-muted);
}

.suggestions-section li.empty-state::before {
    display: none;
}

.disclaimer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.disclaimer a {
    color: var(--primary);
    text-decoration: none;
}

.disclaimer a:hover {
    text-decoration: underline;
}

/* Tooltip standard */
.tooltip {
    position: relative;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--bg-hover);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}