/* Modern, clean design with professional color scheme */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #059669;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Security Notice */
.security-notice {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.notice-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.notice-content .icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.security-notice h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.security-notice p {
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.security-notice strong {
    font-weight: 600;
}

/* Generator Section */
.generator-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.settings,
.generator-output {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.settings h2,
.generator-output h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Settings */
.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-tooltip {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--text-secondary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: help;
    margin-left: 0.25rem;
}

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

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.value-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    color: var(--primary-color);
}

input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Generator Output */
.generate-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: background 0.2s, transform 0.1s;
    margin-bottom: 1.5rem;
}

.generate-btn:hover {
    background: var(--primary-hover);
}

.generate-btn:active {
    transform: scale(0.98);
}

.generate-btn .icon {
    width: 24px;
    height: 24px;
}

.output-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.password-display {
    flex: 1;
    padding: 1.25rem;
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    word-break: break-all;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.password-display .placeholder {
    color: var(--text-secondary);
    font-style: italic;
    font-family: inherit;
}

.password-display .password {
    color: var(--text-primary);
    font-weight: 500;
}

.copy-btn {
    padding: 0.75rem;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:not(:disabled):hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.copy-btn:not(:disabled):hover .icon {
    stroke: white;
}

.copy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.copy-btn.copied {
    background: var(--success-color) !important;
    border-color: var(--success-color) !important;
    color: white;
}

.copy-btn.copied .icon {
    stroke: white;
}

.copy-btn .icon {
    width: 24px;
    height: 24px;
}

/* Password Strength */
.password-strength {
    margin-top: 1rem;
}

.strength-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.strength-fill.weak {
    background: #ef4444;
    width: 33%;
}

.strength-fill.medium {
    background: #f59e0b;
    width: 66%;
}

.strength-fill.strong {
    background: #10b981;
    width: 100%;
}

.strength-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#strengthText {
    font-weight: 600;
}

/* Info Section */
.info-section {
    background: var(--card-background);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.info-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-card {
    padding: 1.5rem;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.info-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.faq {
    margin-top: 2rem;
}

.faq h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faq p,
.faq ol {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.faq ol {
    margin-left: 1.5rem;
}

.faq li {
    margin-bottom: 0.5rem;
}

.faq code {
    background: var(--background);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 0.5rem;
}

footer .small {
    font-size: 0.875rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .generator-section {
        grid-template-columns: 1fr;
    }

    .notice-content {
        flex-direction: column;
    }

    .notice-content .icon {
        width: 36px;
        height: 36px;
    }

    .security-notice {
        padding: 1.5rem;
    }

    .settings,
    .generator-output,
    .info-section {
        padding: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility */
.icon {
    stroke-linecap: round;
    stroke-linejoin: round;
}
