:root {
    --primary: #4361ee;
    --primary-light: #e0e7ff;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.header {
    padding: 1.5rem 2rem;
    background-color: var(--primary);
    color: white;
}

.header h1 {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.header p {
    opacity: 0.9;
    font-size: 0.875rem;
}

.content {
    padding: 2rem;
}

.input-group {
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.password-container {
    position: relative;
    display: flex;
}

input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.toggle-visibility {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
}

.toggle-visibility:hover {
    color: var(--primary);
}

.strength-meter {
    margin-top: 0.5rem;
    height: 6px;
    background-color: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    width: 0%;
    background-color: var(--danger);
    transition: width 0.3s ease, background-color 0.3s ease;
}

.heatmap-container {
    margin-top: 2rem;
}

.heatmap-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.heatmap-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.heatmap {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.heatmap-item {
    flex: 1;
    height: 40px;
    border-radius: 4px;
    background-color: var(--gray-200);
    transition: background-color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.heatmap-item::before {
    content: attr(data-pos);
    position: absolute;
    top: -20px;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-shadow: none;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-card {
    background-color: var(--gray-50);
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--primary);
}

.stat-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

.suggestions {
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--primary-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.suggestions h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.suggestions ul {
    padding-left: 1.25rem;
    font-size: 0.875rem;
}

.suggestions li {
    margin-bottom: 0.25rem;
}

.copy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background-color: #3a56d4;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--gray-800);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    font-weight: normal;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 600px) {
    .heatmap {
        flex-wrap: wrap;
    }

    .heatmap-item {
        flex: 0 0 calc(10% - 0.5rem);
        height: 30px;
        font-size: 0.75rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }
}