/* ============================================
   Password Generator - Styles
   ============================================ */

/* Root Variables */
:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --bg-light: #f8f9fa;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02424 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".1" fill="%23ffffff"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-icon {
    margin-top: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

/* Tool Section */
.tool-section {
    padding: 60px 0;
}

.tool-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 40px;
}

/* Password Output */
.password-output {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--bg-light);
}

.password-output h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.password-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#passwordOutput {
    flex: 1;
    padding: 18px 20px;
    font-size: 1.2rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    background: var(--bg-light);
    color: var(--text-dark);
    transition: var(--transition);
}

#passwordOutput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.btn-icon {
    width: 56px;
    height: 56px;
    padding: 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: #a02424;
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Strength Meter */
.strength-meter {
    margin-top: 15px;
}

.strength-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: var(--text-muted);
    transition: all 0.5s ease;
    border-radius: 5px;
}

.strength-fill.weak {
    width: 25%;
    background: var(--danger);
}

.strength-fill.fair {
    width: 50%;
    background: var(--warning);
}

.strength-fill.good {
    width: 75%;
    background: #17a2b8;
}

.strength-fill.strong {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.strength-text.weak { color: var(--danger); }
.strength-text.fair { color: var(--warning); }
.strength-text.good { color: #17a2b8; }
.strength-text.strong { color: var(--success); }

/* Password Settings */
.password-settings h3 {
    margin-bottom: 30px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

.control-group {
    margin-bottom: 30px;
}

.control-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.control-group label span {
    color: var(--primary-color);
    float: right;
    font-size: 1.1rem;
}

.control-group input[type="range"] {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    transition: var(--transition);
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #a02424;
    transform: scale(1.2);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    transition: var(--transition);
}

.control-group input[type="range"]::-moz-range-thumb:hover {
    background: #a02424;
    transform: scale(1.2);
}

.length-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Character Options */
.character-options {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 30px;
}

.character-options h4 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    transition: var(--transition);
}

.checkbox-label:hover {
    color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label span {
    font-size: 0.95rem;
    user-select: none;
}

/* Custom Characters */
.custom-characters {
    margin-bottom: 30px;
}

.custom-characters label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.custom-characters input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.custom-characters input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.custom-characters small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #a02424;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 46, 46, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: var(--white);
    border-color: var(--primary-color);
}

.btn-success {
    background: var(--accent-color);
    color: var(--text-dark);
}

.btn-success:hover {
    background: #a8c85d;
    transform: translateY(-2px);
}

/* Multiple Passwords Section */
.multiple-passwords {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--bg-light);
}

.multiple-passwords h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    font-size: 1.3rem;
}

#passwordsList {
    margin-bottom: 20px;
}

.password-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
    transition: var(--transition);
}

.password-item:hover {
    background: #e9ecef;
}

.password-item span {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
    word-break: break-all;
}

.password-item button {
    min-width: 40px;
    height: 40px;
    padding: 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-item button:hover {
    background: #a02424;
    transform: scale(1.05);
}

/* Security Notice */
.security-notice {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 40px;
}

.security-notice svg {
    flex-shrink: 0;
}

.security-notice strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.security-notice p {
    color: var(--text-dark);
    margin: 0;
    font-size: 0.95rem;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--white);
}

.features-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* How To Section */
.how-to-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.how-to-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Content Section */
.content-section {
    padding: 80px 0;
    background: var(--white);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-wrapper h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.content-wrapper h3 {
    font-size: 1.6rem;
    margin: 40px 0 20px;
    color: var(--text-dark);
}

.content-wrapper p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2a2a2a 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.btn-cta-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-cta-primary:hover {
    background: #a02424;
    transform: translateY(-2px);
}

.btn-cta-secondary {
    background: var(--white);
    color: var(--text-dark);
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-cta-secondary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.cta-subtext {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.faq-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 25px;
    background: var(--white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 25px 25px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .btn-icon {
        width: 100%;
        height: 50px;
    }
}

@media (max-width: 480px) {
    #passwordOutput {
        font-size: 1rem;
    }
}