/* ============================================
   Variable Definitions
   ============================================ */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    
    /* Strength colors */
    --strength-weak: #ff4757;
    --strength-fair: #ffa502;
    --strength-good: #2ed573;
    --strength-strong: #1e90ff;
    --strength-very-strong: #5352ed;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   Header Styles
   ============================================ */
.header {
    text-align: center;
    color: var(--white);
    margin-bottom: 40px;
    padding: 40px 20px;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 3.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* ============================================
   Generator Card
   ============================================ */
.generator-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ============================================
   Settings Section
   ============================================ */
.setting-group {
    margin-bottom: 30px;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.label-icon {
    font-size: 1.3rem;
}

.length-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 10px;
}

.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.length-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.length-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.length-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.length-hint {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.character-options {
    margin-top: 30px;
}

.options-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-color);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: var(--transition);
}

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

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

.checkbox-text {
    font-size: 1rem;
    color: var(--text-color);
    user-select: none;
}

/* ============================================
   Password Display Section
   ============================================ */
.password-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #f0f0f0;
}

.password-display {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.password-input {
    flex: 1;
    padding: 18px 20px;
    font-size: 1.3rem;
    font-family: 'Courier New', monospace;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    color: var(--text-color);
    transition: var(--transition);
    letter-spacing: 2px;
    min-width: 0; /* Allow flex item to shrink */
}

.password-input::placeholder {
    font-size: 1rem;
    letter-spacing: 0.5px;
    color: #999;
    opacity: 0.8;
}

.password-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.copy-icon {
    font-size: 1.2rem;
}

/* ============================================
   Strength Indicator
   ============================================ */
.strength-section {
    margin-bottom: 25px;
}

.strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 500;
}

.strength-text {
    font-weight: 700;
    font-size: 1.1rem;
}

.strength-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: var(--transition);
    background: var(--strength-weak);
}

.strength-bar-fill.weak {
    width: 25%;
    background: var(--strength-weak);
}

.strength-bar-fill.fair {
    width: 50%;
    background: var(--strength-fair);
}

.strength-bar-fill.good {
    width: 75%;
    background: var(--strength-good);
}

.strength-bar-fill.strong {
    width: 90%;
    background: var(--strength-strong);
}

.strength-bar-fill.very-strong {
    width: 100%;
    background: var(--strength-very-strong);
}

.strength-score {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: right;
}

/* ============================================
   Recommendations Box
   ============================================ */
.recommendations-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.recommendations-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.recommendations-list {
    list-style: none;
    padding-left: 0;
}

.recommendations-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-color);
}

.recommendations-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--strength-good);
    font-weight: bold;
}

/* ============================================
   Password Hint Box
   ============================================ */
.hint-box {
    background: #fff9e6;
    border-left: 4px solid #ffa502;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hint-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.hint-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* ============================================
   Action Buttons
   ============================================ */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.generate-btn,
.regenerate-btn {
    flex: 1;
    padding: 18px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.generate-btn:hover,
.regenerate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-icon {
    font-size: 1.3rem;
}

/* ============================================
   Info Section
   ============================================ */
.info-section,
.faq-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 30px;
}

.info-section h2,
.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-color);
}

.info-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.info-content ul,
.info-content ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.info-content li {
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.8;
}

.info-content p {
    margin-bottom: 20px;
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   FAQ Section
   ============================================ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.faq-answer {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   Feedback Section
   ============================================ */
.feedback-section {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 30px;
}

.feedback-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feedback-subtitle {
    color: var(--text-light);
    margin-bottom: 30px;
}

.feedback-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-color);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.feedback-submit-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.feedback-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.feedback-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

.feedback-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.feedback-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    color: var(--white);
    padding: 30px 20px;
    margin-top: 40px;
}

.footer-content p {
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-content a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-content a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================
   Recent Queries Section
   ============================================ */
.recent-queries-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.recent-queries-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.recent-query-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: var(--transition);
}

.recent-query-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateX(3px);
}

.recent-query-content {
    flex: 1;
    min-width: 0;
}

.recent-query-date {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 3px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
}

.recent-query-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.recent-query-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.recent-query-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.recent-query-btn:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: var(--shadow-sm);
}

.recent-query-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.recent-query-delete-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5576c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    transition: var(--transition);
    line-height: 1;
}

.recent-query-delete-btn:hover {
    background: #e63946;
    transform: scale(1.1);
    box-shadow: var(--shadow-sm);
}

.recent-query-delete-btn:active {
    transform: scale(0.95);
}

/* ============================================
   Floating Navigation
   ============================================ */
.floating-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    min-width: 140px;
    max-width: 160px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.floating-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-title {
    font-size: 0.9rem;
}

.floating-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-nav-list li {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    text-align: center;
}

.nav-link:hover {
    background: #f8f9fa;
    color: var(--text-color);
    transform: translateX(-3px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 500;
    box-shadow: var(--shadow-md);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0 2px 2px 0;
}

/* Hide floating nav on mobile and tablet */
@media (max-width: 1024px) {
    .floating-nav {
        display: none !important;
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .title-icon {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .generator-card,
    .info-section,
    .faq-section,
    .feedback-section {
        padding: 25px;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .password-input {
        font-size: 1.1rem;
    }
    
    .recent-queries-section {
        padding: 15px;
    }
    
    .recent-query-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .recent-query-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 20px 10px;
    }
    
    .title {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .generator-card,
    .info-section,
    .faq-section,
    .feedback-section {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

