* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #495057;
    --section-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
    --border-color: #e9ecef;
}

[data-theme="dark"] {
    --bg-primary: #0d0d1a;
    --bg-secondary: #1a1a2e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --section-bg: #16162a;
    --shadow: rgba(0, 0, 0, 0.5);
    --border-color: #2a2a4a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 0 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Left Banner Ad */
.left-banner-ad {
    position: fixed;
    top: 20%;
    left: 20px;
    width: 160px;
    height: 600px;
    z-index: 999;
    background: transparent;
}

.left-banner-ad .kakao_ad_area {
    display: block !important;
}

/* Right Banner Ad */
.right-banner-ad {
    position: fixed;
    top: 20%;
    right: 20px;
    width: 160px;
    height: 600px;
    z-index: 999;
    background: transparent;
}

.right-banner-ad .kakao_ad_area {
    display: block !important;
}

/* Navbar Styles */
.navbar {
    width: 100%;
    background: #000000;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-brand {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 60%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #fff;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.theme-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.language-selector select {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-selector select option {
    background: #000000;
    color: #fff;
}

/* Hero Section */
.hero {
    width: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    text-align: center;
    padding: 80px 20px;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    color: #bdc3c7;
    font-size: 20px;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 180px;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Generator Sections */
.generator-section {
    width: 100%;
    padding: 80px 20px;
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.generator-section:nth-child(3) {
    background: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.generator-section:nth-child(4) {
    background: #1e1e3a;
    transition: background-color 0.3s ease;
}

.generator-section .container {
    margin: 0 auto;
}

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

.section-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 16px;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    border: none;
    padding: 0;
    transition: color 0.3s ease;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 18px;
    transition: color 0.3s ease;
}

.container {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow);
    padding: 40px;
    max-width: 550px;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section {
    background: var(--section-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.section h2 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

.options label:hover {
    background: var(--border-color);
}

.options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3498db;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.input-group label {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.input-group input[type="number"] {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.input-group input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
}

.input-group input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    transition: all 0.2s;
}

.input-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

#pwdLengthDisplay {
    min-width: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #3498db;
}

.btn-generate {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #3498db;
    color: white;
    margin-bottom: 16px;
}

.btn-generate:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

.result {
    display: flex;
    gap: 10px;
}

.result input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Monaco', 'Consolas', monospace;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s, background-color 0.3s ease, color 0.3s ease;
}

.result input:focus {
    outline: none;
    border-color: #3498db;
}

.copy-btn {
    width: 80px;
    background: #27ae60;
    color: white;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #219a52;
}

.strength-container {
    margin-top: 20px;
    padding: 16px;
    background: var(--section-bg);
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.strength-container > label {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.strength-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
    transition: background-color 0.3s ease;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#strengthText {
    font-size: 13px;
    font-weight: 600;
}

/* Footer Styles */
.footer {
    width: 100%;
    background: #000000;
    color: #a0a0a0;
    padding: 40px 40px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h4 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .left-banner-ad,
    .right-banner-ad {
        display: none;
    }

    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .nav-controls {
        margin-left: auto;
    }

    .hero {
        padding: 40px 20px;
        min-height: calc(100vh - 60px);
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .generator-section {
        padding: 50px 15px;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 14px;
    }

    .container {
        padding: 24px 20px;
    }

    .section {
        padding: 20px 16px;
    }

    .options {
        flex-direction: column;
        gap: 10px;
    }

    .options label {
        width: 100%;
        justify-content: center;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .input-group label {
        text-align: center;
    }

    .input-group input[type="number"],
    .input-group input[type="range"] {
        width: 100%;
    }

    #pwdLengthDisplay {
        text-align: center;
    }

    .result {
        flex-direction: column;
        gap: 10px;
    }

    .result input {
        text-align: center;
    }

    .copy-btn {
        width: 100%;
    }

    .footer {
        padding: 30px 20px 15px;
        background: #000000;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .left-banner-ad,
    .right-banner-ad {
        display: none;
    }

    .hero {
        padding: 30px 15px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
        max-width: 250px;
    }

    .container {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .section-header p {
        font-size: 13px;
    }

    .section {
        padding: 16px 14px;
        border-radius: 10px;
    }

    .section h2 {
        font-size: 16px;
    }

    .options label {
        font-size: 13px;
        padding: 8px 10px;
    }

    .btn-generate {
        padding: 12px 16px;
        font-size: 14px;
    }

    .footer {
        padding: 25px 15px 15px;
        background: #000000;
    }

    .footer-section h4 {
        font-size: 16px;
    }

    .footer-section ul li a {
        font-size: 13px;
    }
}

@media (max-width: 500px) {
    .nav-links {
        display: none;
    }

    .language-selector {
        position: static;
        margin-left: auto;
    }
}
