:root {
    --primary: #E74C3C;
    --primary-light: #ff6b5b;
    --primary-dark: #c0392b;
    --secondary: #C0392B;
    --accent: #2ECC71;
    --accent-light: #58d68d;
    --accent-dark: #27ae60;
    --warning: #f39c12;
    --warning-light: #f1c40f;
    --bg-dark: #0D0D0D;
    --bg-panel: rgba(30, 30, 34, 0.7);
    --bg-panel-hover: rgba(40, 40, 45, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    --text-main: #f8f9fa;
    --text-muted: #adb5bd;
    --text-dim: #6c757d;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(231, 76, 60, 0.2);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(231, 76, 60, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(46, 204, 113, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

.app-container {
    width: 100%;
    max-width: 900px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo .highlight {
    color: var(--primary);
}

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

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.glass-panel:hover {
    border-color: var(--border-highlight);
    box-shadow: var(--shadow-md);
}

/* Input Section */
.input-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

input[type="password"],
input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-sm);
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1.25rem;
    color: var(--text-main);
    transition: var(--transition-normal);
    font-family: monospace;
    letter-spacing: 1px;
}

input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    background: rgba(0, 0, 0, 0.5);
}

.icon-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.icon-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

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

.strength-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#strength-label {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

#entropy-value {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 1.1rem;
}

.strength-track {
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.5s ease;
}

.pattern-bg {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: movePattern 2s linear infinite;
}

@keyframes movePattern {
    0% { background-position: 0 0; }
    100% { background-position: 1rem 0; }
}

/* Analysis Grid */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.full-width {
    grid-column: 1 / -1;
}

.analysis-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-content {
    flex: 1;
}

/* Time to Crack */
.crack-time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid transparent;
}

.crack-time-display:last-child {
    margin-bottom: 0;
}

.crack-time-display.primary { border-left-color: var(--primary); }
.crack-time-display.secondary { border-left-color: var(--warning); }
.crack-time-display.accent { border-left-color: var(--accent); }

.crack-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.crack-value {
    font-family: monospace;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

/* Checklist */
.checklist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-normal);
}

.check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-dark);
}

.check-item.met .check-icon {
    background: var(--accent);
}

.check-item.met .check-icon::after {
    content: "✓";
    font-weight: bold;
    font-size: 12px;
}

.check-item.missing .check-icon::after {
    content: "×";
    font-weight: bold;
    font-size: 12px;
    color: var(--text-muted);
}

.check-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.check-item.met .check-text {
    color: var(--text-main);
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.check-item.met .badge {
    background: rgba(46, 204, 113, 0.2);
    color: var(--accent-light);
}

/* Vulnerabilities */
.vuln-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vuln-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(231, 76, 60, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(231, 76, 60, 0.2);
    animation: fadeIn 0.3s ease;
}

.vuln-badge.warning {
    background: rgba(243, 156, 18, 0.1);
    color: var(--warning-light);
    border-color: rgba(243, 156, 18, 0.2);
}

.vuln-badge.good {
    background: rgba(46, 204, 113, 0.1);
    color: var(--accent-light);
    border-color: rgba(46, 204, 113, 0.2);
}

.empty-state {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-dim);
    font-style: italic;
    width: 100%;
}

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

/* Suggestions */
.suggestions-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-item {
    position: relative;
    padding: 1rem 1rem 1rem 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.95rem;
    border-left: 3px solid var(--text-dim);
}

.suggestion-item::before {
    content: "💡";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

.suggestion-item.info { border-left-color: var(--primary); color: var(--text-main); }
.suggestion-item.warning { border-left-color: var(--warning); color: var(--text-main); }
.suggestion-item.success { border-left-color: var(--accent); color: var(--text-main); }

/* Footer */
footer {
    text-align: center;
    padding-top: 1rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-btn {
        width: 100%;
        justify-content: center;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
}
