:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --primary-color: #58a6ff;
    --container-bg: #161b22;
    --border-color: #30363d;
    --input-bg: #010409;
    --error-color: #f85149;
    --warning-color: #d29922;
    --success-color: #2f81f7;
    --strong-color: #238636;
    --font-body: 'Space Grotesk', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
}

#app {
    width: 100%;
    max-width: 500px;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: clamp(1rem, 5vw, 2rem);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

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

header h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 0.5rem;
}

.password-wrapper {
    position: relative;
    margin-bottom: 0.5rem;
}

#password-input {
    width: 100%;
    padding: 0.8rem 3.5rem 0.8rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.3);
}

#toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#eye-icon {
    width: 24px;
    height: 24px;
    filter: invert(70%);
    transition: filter 0.2s;
}

#toggle-password:hover #eye-icon {
    filter: invert(100%);
}

#strength-bar-container {
    height: 8px;
    background-color: var(--input-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

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

#result-container {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    min-height: 50px;
}

#time-to-crack {
    font-weight: bold;
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    display: inline-block;
    transition: color 0.3s ease;
}

#feedback-container {
    background-color: var(--input-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

#criteria-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#criteria-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 0.75rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

#criteria-list li:last-child {
    margin-bottom: 0;
}

#criteria-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: rgba(201, 209, 217, 0.4);
    -webkit-mask-image: url('checkmark.svg');
    mask-image: url('checkmark.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.3s ease;
}

#criteria-list li.met {
    opacity: 1;
}

#criteria-list li.met::before {
    background-color: #3fb950;
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.7;
    padding: 0 1rem;
}

#music-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: background-color 0.2s, border-color 0.2s;
}

#music-toggle-btn:hover {
    background-color: #2c333e;
    border-color: var(--primary-color);
}

#music-toggle-btn #music-icon {
    width: 24px;
    height: 24px;
    filter: invert(70%);
    transition: filter 0.2s;
}

#music-toggle-btn:hover #music-icon {
    filter: invert(100%);
}