/*
Theme Name: Password Generator & Tools
Version: 1.1
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.site-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #667eea;
}

.music-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

/* Main content */
main {
    padding-top: 100px;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-buttons .scroll-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 180px;
}

.hero-buttons .scroll-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Password section */
.password-section {
    background: white;
    margin: 2rem auto;
    max-width: 800px;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.password-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #333;
}

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

.generator-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.generator-controls input[type="number"] {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    width: 80px;
    margin-left: 0.5rem;
}

.generator-controls input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.generate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.password-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.password-display label {
    font-weight: 600;
    color: #4a5568;
}

.password-display input {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: #f7fafc;
}

#copy-btn {
    background: #48bb78;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#copy-btn:hover {
    background: #38a169;
    transform: translateY(-2px);
}

/* Password result initially hidden */
#password-result {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#password-result.show {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

/* Form styling */
#password-form,
#mbti-start-form {
    display: inline-block;
}

/* MBTI Section */
.mbti-section {
    background: white;
    margin: 2rem auto;
    max-width: 800px;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.mbti-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.mbti-intro {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.mbti-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.mbti-start-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.mbti-start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.mbti-progress {
    margin-bottom: 2rem;
}

.progress-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    display: block;
}

.mbti-question {
    margin-bottom: 2rem;
    animation: slideIn 0.3s ease-out;
}

.mbti-question h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.mbti-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mbti-option {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mbti-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.mbti-option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.mbti-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.mbti-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.mbti-nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.mbti-nav-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.mbti-nav-btn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
}

.mbti-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.mbti-result {
    text-align: center;
    padding: 2rem;
}

.mbti-result h3 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.mbti-result p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4a5568;
}

/* Ad styles */
.adsense-wrapper {
    margin: 2rem auto;
    max-width: 800px;
    padding: 0 1rem;
}

.adsense-content {
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.adsbygoogle {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

/* Floating ad */
.floating-adsense-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 160px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    overflow: hidden;
}

.floating-ad-header {
    background: #f8fafc;
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.floating-ad-content {
    padding: 0.5rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-ad {
    width: 100% !important;
    max-width: 150px !important;
    min-height: 180px;
}

/* Music player */
.music-player {
    background: white;
    margin: 2rem auto;
    max-width: 800px;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.music-player label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #4a5568;
}

.music-player audio {
    width: 100%;
    max-width: 400px;
}

/* Language toggle */
.lang-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.lang-toggle label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
}

.lang-toggle select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .site-title {
        font-size: 0.9rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .desktop-title {
        display: none;
    }
    
    .mobile-title {
        display: block;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .scroll-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .password-section,
    .mbti-section {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .generator-controls {
        grid-template-columns: 1fr;
    }
    
    .password-display {
        gap: 0.5rem;
    }
    
    .floating-adsense-container {
        display: none;
    }
    
    .adsense-content {
        padding: 0.5rem;
        min-height: 200px;
    }
    
    .mbti-options {
        gap: 0.5rem;
    }
    
    .mbti-option {
        padding: 0.75rem;
    }
    
    .mbti-nav-buttons {
        flex-direction: column;
    }
    
    .lang-toggle {
        bottom: 10px;
        left: 10px;
        padding: 0.75rem;
    }
}

@media (min-width: 769px) {
    .mobile-title {
        display: none;
    }
    
    .desktop-title {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .password-section,
    .mbti-section {
        margin: 1rem 0.5rem;
        padding: 1.5rem 1rem;
    }
    
    .generator-controls {
        gap: 0.5rem;
    }
    
    .password-display {
        gap: 0.5rem;
    }
    
    .mbti-options {
        gap: 0.5rem;
    }
    
    .mbti-option {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .mbti-nav-buttons {
        gap: 0.5rem;
    }
    
    .mbti-nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .site-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .site-header {
        background: rgba(45, 55, 72, 0.95);
    }
    
    .site-title,
    .nav-menu a {
        color: #e2e8f0;
    }
    
    .password-section,
    .mbti-section,
    .music-player {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .password-section h2,
    .mbti-section h2 {
        color: #e2e8f0;
    }
    
    .mbti-card {
        background: #4a5568;
    }
    
    .mbti-option {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .mbti-option:hover {
        background: #4a5568;
    }
}

/* Print styles */
@media print {
    .site-header,
    .lang-toggle,
    .floating-adsense-container,
    .adsense-wrapper,
    .music-player {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .password-section,
    .mbti-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .fade-in {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .generate-btn,
    .mbti-start-button,
    .mbti-nav-btn {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .password-section,
    .mbti-section {
        border: 2px solid #000;
    }
}
