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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    padding: 40px;
    animation: slideUp 0.5s ease;
}

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

header {
    margin-bottom: 25px;
}

h1 {
    color: #302b63;
    margin-bottom: 8px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

.status-banner {
    background: #e8f0fe;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
    transition: all 0.3s;
}

.status-banner.loading {
    background: #fff3e0;
    color: #e65100;
}

.status-banner.error {
    background: #fee8e7;
    color: #d93025;
}

.status-banner.success {
    background: #e6f4ea;
    color: #137333;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #e65100;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
    font-family: monospace;
}

input:focus {
    outline: none;
    border-color: #302b63;
    box-shadow: 0 0 0 3px rgba(48, 43, 99, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    color: #666;
}

.strength-meter {
    margin: 20px 0;
}

.strength-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 10px;
}

.strength-text {
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #302b63;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.chart-container {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    margin: 15px 0;
}

.criteria {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.criteria h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}

.criteria-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
}

.criteria-list li {
    font-size: 13px;
    padding: 5px 0;
    color: #666;
}

.criteria-list li.valid {
    color: #4caf50;
}

.criteria-list li.invalid {
    color: #f44336;
}

.breach-warning {
    background: #ffebee;
    border-left: 4px solid #f44336;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.breach-warning h3 {
    color: #d32f2f;
    margin-bottom: 8px;
}

.alternatives {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.alternatives h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #1976d2;
}

.alternative-item {
    background: white;
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.alternative-item:hover {
    transform: translateX(4px);
}

.alternative-password {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #302b63;
    word-break: break-all;
    flex: 1;
}

.use-btn {
    background: #302b63;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.use-btn:hover {
    background: #1a1742;
    transform: scale(1.05);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    background: #302b63;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

button:hover {
    background: #1a1742;
    transform: translateY(-2px);
}

.clear-btn {
    background: #999;
}

.clear-btn:hover {
    background: #777;
}

footer {
    margin-top: 30px;
    text-align: center;
    font-size: 11px;
    color: #999;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    .alternative-item {
        flex-direction: column;
        align-items: stretch;
    }
    .criteria-list {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
