/* Main container to constrain width */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.generator-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
}

.header-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.generator-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.subtitle {
    font-size: 18px;
    color: #6b7280;
}

.generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .generator-container {
        grid-template-columns: 1fr;
    }
}

.controls-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.control-group {
    margin-bottom: 24px;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
    font-size: 14px;
}

#passwordLength {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    margin: 16px 0;
}

#passwordLength::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s;
}

#passwordLength::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #2563eb;
}

#lengthValue {
    font-weight: 700;
    color: #3b82f6;
    font-size: 18px;
}

.length-presets {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.preset-btn {
    padding: 6px 12px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.preset-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f9fafb;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
    color: #4b5563;
}

#passwordCount {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

#passwordCount:focus {
    outline: none;
    border-color: #3b82f6;
}

.generate-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

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

.results-section {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.password-results {
    min-height: 300px;
}

.placeholder {
    text-align: center;
    color: #9ca3af;
    padding: 60px 20px;
    font-size: 16px;
}

.password-item {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.password-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.password-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    word-break: break-all;
    padding: 8px;
    background: white;
    border-radius: 6px;
}

.copy-btn {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #059669;
    transform: scale(1.05);
}

.copy-btn.copied {
    background: #6b7280;
}

.strength-meter {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    transition: all 0.3s;
    border-radius: 4px;
}

.strength-label {
    font-weight: 600;
    min-width: 100px;
}

.strength-info {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.info-section {
    margin-top: 60px;
}

.info-section h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    color: #1a1a1a;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.tip-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.tip-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1f2937;
}

.tip-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 16px;
    }

    .generator-header h1 {
        font-size: 28px;
    }

    .controls-section, .results-section {
        padding: 20px;
    }

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

@media (max-width: 480px) {
    .main-container {
        padding: 16px 12px;
    }
}