.loading-dots {
    font-size: 1rem;
    color: #705fbe;
    font-family: inherit;
    letter-spacing: 1px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal styles for EasyPass */
#easypass-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 15px;
}

#easypass-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(2px);
}

#easypass-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.18);
    padding: 32px 28px 22px 28px;
    min-width: 280px;
    max-width: min(90vw, 500px);
    width: 100%;
    text-align: center;
    z-index: 1;
    border: 1px solid #e5e7eb;
}

#easypass-modal .modal-message {
    font-size: 1.08rem;
    color: #705fbe;
    margin-bottom: 18px;
    font-weight: 500;
}

#easypass-modal .modal-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    transition: background 0.2s;
}

#easypass-modal .modal-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Info icon and tooltip styles */
.info-icon svg {
    vertical-align: middle;
}

.info-icon:focus .tooltip,
.info-icon:hover .tooltip {
    display: block !important;
}

.info-icon .tooltip {
    display: none;
    position: absolute;
    left: 22px;
    top: 0;
    background: #fff;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    z-index: 10;
}

/* Base styles - Mobile first approach */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scroll */
    margin: 0;
    width: 100vw; /* Ensure full width */
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.tagline {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.input-section {
    margin-bottom: 20px;
}

.input-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
    outline: none;
}

.input-field:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.input-hint {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 6px;
    font-style: italic;
}

.slider-container {
    position: relative;
    margin: 15px 0;
    touch-action: pan-y; /* Allow vertical scrolling, prevent horizontal */
    -webkit-user-select: none; /* Prevent text selection on iOS */
    user-select: none;
}

.strength-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: linear-gradient(to right, #dc2626 0%, #24d609 50%, #10b981 100%);
    outline: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    touch-action: pan-y; /* Prevent horizontal page drag */
    -webkit-user-select: none;
    user-select: none;
}

.strength-slider:hover {
    opacity: 1;
}

.strength-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.strength-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.strength-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #6b7280;
}

.strength-display {
    text-align: center;
    margin-top: 2px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: box-shadow 0.2s, transform 0.2s;
    min-height: 44px; /* Touch-friendly */
}

.generate-btn:hover {
    transform: translateY(-1px) scale(1.005);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.highlight {
    background: #d9c2f6;   
    padding: 1px 0px;   
    font-weight: 600;
    font-size: 1em;    
}

.result-section {
    opacity: 0;
    visibility: hidden;
    background: #f8fafc;
    border-radius: 14px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    transition: all 0.5s ease;
    transform: translateY(10px);
    min-height: 100px;
}

.result-section.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.result-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-output {
    background: #1f2937;
    color: #10b981;
    padding: 12px;
    border-radius: 10px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    margin-bottom: 12px;
    word-break: break-all;
    position: relative;
    min-height: 44px;
}

.passphrase-container {
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    margin-bottom: 10px;
    overflow: visible;
    position: relative;
    z-index: 10;
}

.passphrase-title {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    padding: 8px 14px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-trigger {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.tooltip-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    min-width: 250px;
    max-width: calc(100vw - 30px);
    white-space: normal;
    line-height: 1.3;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.tooltip-container:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

.sentence-output {
    background: white;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.copy-btn {
    position: absolute;
    top: 6px;
    right: 10px;
    background: rgba(16, 185, 129, 0.2);
    border: none;
    color: #10b981;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    min-height: 32px;
}

.copy-btn:hover {
    background: rgba(16, 185, 129, 0.3);
}

.examples {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.examples-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.example-item {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #475569;
    border-left: 3px solid #667eea;
    line-height: 1.3;
}

.example-item small {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    color: #64748b;
}

.strength-indicator {
    display: flex;
    gap: 3px;
    margin-top: 6px;
    align-items: center;
}

.strength-bar {
    height: 3px;
    width: 18px;
    background: #e5e7eb;
    border-radius: 2px;
}

.strength-bar.active {
    background: #10b981;
}

.strength-text {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    margin-left: 6px;
}
/* Footer styles */
.footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 5px;
    padding: 1px 15px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
}

.contact-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 4px;
    border-radius: 6px;
}

.contact-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.contact-link:active {
    transform: translateY(0);
}

.contact-icon {
    width: 16px;
    height: 16px;
    opacity: 0.9;
}
/* Mobile-specific slider fixes */
@media only screen and (max-width: 767px) {
    body {
        padding: 6px;
    }
    
    .container {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        padding: 18px 15px;
        border-radius: 14px;
    }
    
    .slider-container {
        padding: 10px 0;
        touch-action: pan-y;
    }
    
    .strength-slider {
        height: 12px; /* Larger touch target on mobile */
        touch-action: pan-y;
    }
    
    .strength-slider::-webkit-slider-thumb {
        width: 28px; /* Larger thumb for easier touch */
        height: 28px;
        -webkit-appearance: none;
        appearance: none;
        border-radius: 50%;
        background: white;
        border: 3px solid #667eea;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
        touch-action: pan-y;
    }
    
    .strength-slider::-moz-range-thumb {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: white;
        border: 3px solid #667eea;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        touch-action: pan-y;
    }
}

/* Tablet styles */
@media only screen and (min-width: 768px) {
    body {
        padding: 15px;
        align-items: center;
    }

    .container {
        padding: 25px 20px;
        border-radius: 18px;
        max-width: 600px;
        min-height: 600px;
    }

    .logo {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .input-label {
        font-size: 1rem;
    }

    .input-field {
        padding: 13px 16px;
        font-size: 0.95rem;
    }

    .generate-btn {
        font-size: 1rem;
        padding: 11px;
    }

    .result-section {
        padding: 18px;
        min-height: 110px;
    }

    .result-title {
        font-size: 1.05rem;
    }

    .password-output {
        padding: 13px;
        font-size: 0.95rem;
        min-height: 47px;
    }

    .sentence-output {
        padding: 13px;
        font-size: 1.05rem;
    }

    .tooltip-text {
        font-size: 0.75rem;
        min-width: 300px;
    }

    .examples {
        margin-top: 18px;
        padding-top: 18px;
    }

    .examples-title {
        font-size: 1rem;
    }

    .example-item {
        padding: 9px 13px;
        font-size: 0.82rem;
    }

    .copy-btn {
        font-size: 0.8rem;
    }
}

/* Desktop styles */
@media only screen and (min-width: 1024px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 30px;
        border-radius: 20px;
        max-width: 650px;
        min-height: 700px;
    }

    .logo {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .input-field {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .strength-labels {
        font-size: 0.8rem;
    }

    .strength-display {
        font-size: 1rem;
    }

    .result-section {
        padding: 20px;
        min-height: 120px;
    }

    .result-title {
        font-size: 1.1rem;
    }

    .password-output {
        padding: 14px;
        font-size: 1rem;
        min-height: 49px;
    }

    .sentence-output {
        padding: 14px;
        font-size: 1.1rem;
    }

    .tooltip-text {
        font-size: 0.75rem;
        min-width: 340px;
    }

    .examples {
        margin-top: 20px;
        padding-top: 20px;
    }

    .copy-btn {
        top: 9px;
        right: 12px;
        font-size: 0.8rem;
    }

    .example-item {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .example-item small {
        font-size: 0.8rem;
    }
}

/* Large desktop styles */
@media only screen and (min-width: 1440px) {
    .container {
        max-width: 700px;
    }
}

/* High DPI displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
    .strength-slider::-webkit-slider-thumb {
        border-width: 2px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}