/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #374151;
    line-height: 1.6;
}

/* Main Container */
.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 48px;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.container:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 32px 64px -12px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Typography */
h1 {
    margin-bottom: 32px;
    color: #1f2937;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    margin: 32px 0 16px 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Form Elements */
label {
    display: block;
    margin: 16px 0 8px 0;
    text-align: left;
    font-weight: 500;
    color: #4b5563;
    font-size: 0.95rem;
}

.options {
    margin: 24px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.options label {
    display: flex;
    align-items: center;
    margin: 12px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.options label:hover {
    color: #6366f1;
}

.options input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
}

input[type="number"] {
    width: 100%;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

input[type="number"]:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

/* Button Styling */
button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover {
    background: linear-gradient(135deg, #5b5bd6 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Password Result Display */
#result {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    word-break: break-all;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#result:not(:empty) {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-color: #10b981;
    color: #047857;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

#result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#result:not(:empty)::before {
    transform: scaleX(1);
}

/* Responsive Design */
@media (max-width: 640px) {
    body {
        padding: 16px;
    }
    
    .container {
        padding: 32px 24px;
    }
    
    h1 {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }
    
    input[type="number"], button {
        padding: 14px;
    }
}
