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

:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-color: #f59e0b;
    --background: #ffffff;
    --surface: #f8fafc;
    --surface-hover: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #fbbf24;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --border-hover: #475569;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    background: var(--surface-hover);
    transform: scale(1.05);
}

.theme-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    gap: 2rem;
}

.hero-text h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-visual {
    flex-shrink: 0;
}

.shield-icon {
    font-size: 4rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Password Display */
.password-display {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.password-output {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.password-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.05em;
}

.password-field:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.password-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 1rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.action-btn .icon {
    font-size: 1.25rem;
}

/* Strength Meter */
.strength-meter {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    background: var(--success);
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    width: 90%;
}

.strength-text {
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
}

/* AdSense Ad Space */
.ad-space {
    margin-bottom: 2rem;
    text-align: center;
}

.ad-placeholder {
    position: relative;
    min-height: 100px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-demo {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 2rem;
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 0.25rem;
    margin-bottom: 3rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow);
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
}

/* Generator Sections */
.generator-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.generator-section.hidden {
    display: none;
}

.generator-section h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Presets */
.presets {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.preset-btn {
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.preset-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Control Panel */
.control-panel {
    display: grid;
    gap: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-primary);
}

/* Slider */
.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 0.5rem;
    background: var(--border);
    border-radius: 0.25rem;
    outline: none;
    transition: background 0.3s ease;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.slider::-moz-range-thumb {
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Character Sets */
.character-sets {
    display: grid;
    gap: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-weight: 400;
}

/* Select */
select {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Text Input */
.text-input {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Education Section */
.education-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.education-section h2 {
    margin-bottom: 2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.password-examples {
    display: grid;
    gap: 1rem;
    margin-bottom: 3rem;
}

.example {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--background);
    border-left: 4px solid;
}

.example.weak {
    border-left-color: var(--danger);
}

.example.medium {
    border-left-color: var(--warning);
}

.example.strong {
    border-left-color: var(--success);
}

.example .icon {
    font-size: 1.5rem;
}

.example-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.example-content code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 1.1rem;
}

.crack-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.tip h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.tip p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Advanced Section */
.advanced-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
}

.advanced-section details summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.5rem 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-section details summary::-webkit-details-marker {
    display: none;
}

.advanced-section details summary::before {
    content: '▶';
    transition: transform 0.3s ease;
}

.advanced-section details[open] summary::before {
    transform: rotate(90deg);
}

.advanced-content {
    padding-top: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.entropy-display {
    background: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    text-align: center;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Manual Entry Styles */
.manual-entry-panel {
    display: grid;
    gap: 2rem;
}

.manual-description {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary-color);
}

.manual-description p {
    color: var(--text-secondary);
    margin: 0;
}

.manual-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.manual-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.manual-password-input {
    flex: 1;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

.manual-password-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.visibility-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.visibility-btn:hover {
    color: var(--primary-color);
}

.manual-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.analyze-btn, .clear-btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.analyze-btn {
    background: var(--primary-color);
    color: white;
}

.analyze-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.clear-btn {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.clear-btn:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* Edit Mode Styles */
.password-field.editable {
    background: rgba(255, 255, 255, 0.3);
    cursor: text;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.edit-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Content Pages Styles */
.content-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.content-main {
    padding: 3rem 0;
    min-height: 60vh;
}

.content-article {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.content-article h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.content-article h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem 0;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.content-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.content-article p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content-article ul, .content-article ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-article li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.content-article a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.content-article a:hover {
    text-decoration: underline;
}

.content-article section {
    margin-bottom: 2.5rem;
}

/* Feature Grid for About Page */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.feature-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Contact Page Styles */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
}

.contact-card p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

.contact-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

/* FAQ Styles */
.faq-item {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.faq-item p {
    margin: 0;
}

.contact-note {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    border-left: 4px solid var(--primary-color);
    margin-top: 2rem;
}

.contact-note h2 {
    margin-top: 0;
    border: none;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .password-output {
        flex-direction: column;
    }
    
    .presets {
        justify-content: center;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .mode-toggle {
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    .manual-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }
    
    .password-display {
        padding: 1.5rem;
    }
    
    .generator-section {
        padding: 1.5rem;
    }
    
    .education-section {
        padding: 1.5rem;
    }
    
    .advanced-section {
        padding: 1.5rem;
    }
}
