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

:root {
    --primary-color: #ffffff;
    --primary-hover: #e2e8f0;
    --primary-dark: #cbd5e1;
    --accent-light: #94a3b8;
    --accent-cyan: #ffffff;
    --surface: #000000;
    --surface-light: #171717;
    --background: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --border: #262626;
    --success: #10b981;
    --shadow-sm: 0 2px 8px rgba(255, 255, 255, 0.05);
    --shadow-md: 0 4px 16px rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 40px rgba(255, 255, 255, 0.1);
    --glow: 0 0 20px rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #171717 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
}

header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.devrim-link {
    color: var(--accent-light);
    text-decoration: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
        linear-gradient(135deg, var(--primary-color), var(--accent-cyan)) border-box;
}

.devrim-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

/* Layout Updates */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    align-items: start;
}

.container {
    background: var(--surface);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    box-shadow: var(--shadow-lg), var(--glow);
    border: 1px solid var(--border);
    height: 100%;
}

.container h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    text-align: center;
}

/* Password Box Styles */
.password-box {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

#passwordDisplay {
    width: 100%;
    padding: 1.25rem;
    padding-right: 7.5rem;
    font-size: 1.05rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background: linear-gradient(135deg, var(--surface-light) 0%, #262626 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

#passwordDisplay:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), var(--glow);
}

.button-container {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: row;
    gap: 0.4rem;
}

.icon-btn {
    background: linear-gradient(135deg, #404040, #262626);
    border: 1px solid var(--border);
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* Length Control Styles */
.length-control {
    margin-bottom: 2rem;
}

.length-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.length-header label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

#lengthValue {
    background: linear-gradient(135deg, #404040, #262626);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    min-width: 45px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

#lengthSlider {
    width: 100%;
    height: 8px;
    border-radius: 6px;
    background: var(--border);
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 0.5rem;
}

#lengthSlider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

#lengthSlider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

#lengthSlider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

#lengthSlider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-md);
}

.length-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Options Styles */
.options {
    margin-bottom: 1.5rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.03);
}

.checkbox-label:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked~.checkmark {
    background: white;
    border-color: white;
    box-shadow: var(--shadow-sm);
}

.checkbox-label input[type="checkbox"]:checked~.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid black;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checkbox-label span:last-child {
    color: var(--text-primary);
    font-size: 0.975rem;
    font-weight: 500;
}

/* Generate Button Styles */
.generate-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
    color: black;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1), 0 2px 8px rgba(255, 255, 255, 0.05), var(--glow);
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(255, 255, 255, 0.1), var(--glow);
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.generate-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.generate-btn svg {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.generate-btn:hover svg {
    transform: rotate(180deg) scale(1.1);
}

/* Analyzer Styles */
.analyzer-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#analyzerInput {
    width: 100%;
    padding: 1.25rem;
    font-size: 1.05rem;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    background: linear-gradient(135deg, var(--surface-light) 0%, #262626 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.3s ease;
}

#analyzerInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1), var(--glow);
}

.strength-meter {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.strength-meter-mini {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.strength-meter-mini .strength-bars {
    height: 6px;
    margin-bottom: 0;
}

.strength-meter-mini #genStrengthText {
    font-size: 0.8rem;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
}

.strength-bars {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    height: 12px;
}

.bar {
    flex: 1;
    height: 100%;
    background: var(--surface-light);
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

#strengthText {
    display: block;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Strength Colors */
.strength-weak #strengthText {
    color: #ef4444;
}

.strength-medium #strengthText {
    color: #f59e0b;
}

.strength-strong #strengthText {
    color: #eab308;
}

.strength-very-strong #strengthText {
    color: #22c55e;
}

.strength-weak .bar:nth-child(1) {
    background: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.strength-medium .bar:nth-child(-n+2) {
    background: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.strength-strong .bar:nth-child(-n+3) {
    background: #eab308;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.4);
}

.strength-very-strong .bar:nth-child(-n+4) {
    background: #22c55e;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.secondary-btn {
    margin-top: 0;
    background: linear-gradient(135deg, #262626 0%, #171717 100%);
    border: 1px solid var(--border);
    box-shadow: none;
    color: white;
}

.secondary-btn:hover {
    background: linear-gradient(135deg, #404040 0%, #262626 100%);
    border-color: var(--border);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 100px;
    right: 2rem;
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 1000;
}

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

footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    width: 100%;
}

footer a {
    color: var(--accent-light);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    header h1 {
        font-size: 1.15rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .content-wrapper {
        padding: 1rem;
        gap: 1.5rem;
    }

    .container {
        padding: 1.5rem;
    }

    #passwordDisplay,
    #analyzerInput {
        font-size: 0.9rem;
        padding: 1rem;
    }

    #passwordDisplay {
        padding-right: 6.5rem;
    }

    .button-container {
        right: 0.4rem;
        gap: 0.3rem;
    }

    .icon-btn {
        padding: 0.5rem;
    }

    .icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .checkbox-label {
        padding: 0.6rem;
    }

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

    .notification {
        right: 1rem;
        left: 1rem;
        font-size: 0.85rem;
    }

    .length-header label {
        font-size: 0.9rem;
    }

    #lengthValue {
        font-size: 0.9rem;
        padding: 0.3rem 0.7rem;
    }
}