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

:root {
    /* Light Theme Colors - Monochrome Base */
    --primary-color: #000000;
    --primary-hover: #333333;
    --secondary-color: #666666;
    --success-color: #000000;
    --warning-color: #666666;
    --danger-color: #000000;
    --background-color: #ffffff;
    --surface-color: #f8f8f8;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}


body {
    font-family: 'Source Code Pro', 'Courier New', monospace;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

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

/* Header Styles */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 8px;
    position: relative;
    box-shadow: var(--shadow);
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    border-radius: 6px;
    box-shadow: 0 0 0 2px white;
}

.logo-text h1 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}


/* Main Content */
.main {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Password Generator Section */
.password-generator {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.password-generator h2 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.generator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

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

.slider {
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

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

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

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}

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

input[type="text"],
input[type="password"] {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.generate-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

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

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

/* Password Result */
.password-result {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

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

.password-display input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    text-align: center;
    background: var(--surface-color);
}

.copy-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.copy-btn:hover {
    background: #059669;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 6px;
}

.strength-fill.weak { background: #666666; }
.strength-fill.fair { background: #333333; }
.strength-fill.good { background: #000000; }
.strength-fill.strong { background: #000000; }

.strength-text {
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 100px;
}

/* Inline Ad */
.inline-ad {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 1rem 0;
}

/* Strength Checker */
.strength-checker {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.strength-checker h2 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.checker-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checker-form input {
    flex: 1;
}

.check-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.check-btn:hover {
    background: #475569;
}

.check-result {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-height: 100px;
}

/* Password History */
.password-history {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.password-history h2 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.history-controls {
    margin-bottom: 1rem;
}

.clear-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #dc2626;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.history-item .copy-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-ad {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.security-tips,
.related-articles {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.security-tips h3,
.related-articles h3 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.security-tips ul,
.related-articles ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.security-tips li,
.related-articles li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1rem;
    position: relative;
}

.security-tips li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.related-articles a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-articles a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .password-generator,
    .strength-checker,
    .password-history {
        padding: 1.5rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .checker-form {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar-ad {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .password-generator,
    .strength-checker,
    .password-history {
        padding: 1rem;
    }
    
    .password-display {
        flex-direction: column;
    }
    
    .strength-checker h2,
    .password-generator h2,
    .password-history h2 {
        font-size: 1.25rem;
    }
}

/* Subpage Styles */
.privacy-policy,
.terms-of-service,
.article {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.privacy-policy h1,
.terms-of-service h1,
.article h1 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

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

.privacy-policy h2,
.terms-of-service h2,
.article h2 {
    font-family: 'Orbitron', 'Source Code Pro', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
    letter-spacing: 0.02em;
    position: relative;
    padding-left: 1rem;
}

.privacy-policy h2::before,
.terms-of-service h2::before,
.article h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

.privacy-policy h3,
.terms-of-service h3,
.article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid var(--primary-color);
}

.privacy-policy p,
.terms-of-service p,
.article p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.privacy-policy ul,
.terms-of-service ul,
.article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.privacy-policy li,
.terms-of-service li,
.article li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
}

.privacy-policy li::marker,
.terms-of-service li::marker,
.article li::marker {
    color: var(--primary-color);
}

.privacy-policy a,
.terms-of-service a,
.article a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.privacy-policy a:hover,
.terms-of-service a:hover,
.article a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.article-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.article-footer a:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Responsive adjustments for subpages */
@media (max-width: 768px) {
    .privacy-policy,
    .terms-of-service,
    .article {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .privacy-policy h1,
    .terms-of-service h1,
    .article h1 {
        font-size: 1.75rem;
    }
    
    .privacy-policy h2,
    .terms-of-service h2,
    .article h2 {
        font-size: 1.25rem;
    }
    
    .privacy-policy h3,
    .terms-of-service h3,
    .article h3 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .privacy-policy,
    .terms-of-service,
    .article {
        padding: 1rem;
    }
    
    .privacy-policy h1,
    .terms-of-service h1,
    .article h1 {
        font-size: 1.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-result,
.check-result {
    animation: fadeIn 0.3s ease;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* FAQ Styles */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.faq-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.faq-categories {
    margin-bottom: 2rem;
}

.faq-category {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.faq-item h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item p br {
    margin-bottom: 0.5rem;
}

.faq-footer {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.faq-footer h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.faq-footer ul {
    list-style: none;
    padding: 0;
}

.faq-footer li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.faq-footer li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.quick-links {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.quick-links h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.quick-links ul {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

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

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

/* Navigation Active State */
.nav a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-section {
        padding: 1rem;
    }
    
    .faq-category {
        padding: 1rem;
    }
    
    .faq-item {
        padding: 0.75rem;
    }
    
    .faq-footer {
        padding: 1.5rem;
    }
}
