:root {
    --bg-dark: #050505;
    --bg-card: #0F0F0F;
    --bg-card-hover: #141414;
    --primary: #00FF41;
    /* Neo-Matrix Green */
    --primary-dim: rgba(0, 255, 65, 0.1);
    --primary-glow: rgba(0, 255, 65, 0.4);
    --text-main: #FFFFFF;
    --text-muted: #888888;
    --border-color: #333333;
    --danger: #FF3333;
    --warning: #FFBB33;

    --font-heading: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-heading);
    min-height: 100vh;
    /* Allow scroll on mobile */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    /* Default scroll */
}

@media (min-width: 900px) {
    body {
        height: 100vh;
        overflow: hidden;
        /* Lock scroll on desktop/large screens */
    }
}

.app-container {
    width: 100%;
    max-width: 1200px;
}

/* HEADER */
/* HEADER */
header {
    display: flex;
    justify-content: flex-start;
    /* Align left */
    align-items: center;
    gap: 20px;
    /* Space between logo and text */
    margin-bottom: 20px;
    padding: 0 5px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.highlight {
    color: var(--primary);
}

.security-notice {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #5d5d5d;
    /* Requested Gray Color */
    letter-spacing: 0.5px;
    font-weight: 500;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 65, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 65, 0.3);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

/* GRID LAYOUT */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: stretch;
    /* Ensure columns stretch to same height */
    width: 100%;
}

@media (min-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.main-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.content-wrapper {
    flex: 1;
    /* Pushes button to bottom */
    display: flex;
    flex-direction: column;
}

/* CARDS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 0px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* DISPLAY CARD */
.display-card {
    border-top: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(0, 255, 65, 0.03) 0%, rgba(15, 15, 15, 0) 100%);
    margin-bottom: 20px;
    /* Restore spacing between sections */
}

.password-display-wrapper {
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    /* Adjusted padding */
    text-align: left;
    /* Text aligns left to make room for button */
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    display: flex;
    /* Flex layout for password + button */
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.password-text {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    /* Slightly smaller to fit button */
    color: var(--text-main);
    letter-spacing: 1px;
    word-break: break-all;
    flex-grow: 1;
    /* Take available space */
}

/* Split Button Design */
.btn-copy-split {
    display: flex;
    align-items: center;
    background: var(--primary);
    /* Neon Green base */
    color: #000;
    /* Black text for contrast on neon */
    border: none;
    /* Solid look like image */
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: 0;
    /* Padding handled by children */
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 10px var(--primary-dim);
    height: 44px;
    min-width: 100px;
}

.btn-copy-split:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-label {
    padding: 0 16px;
    flex-grow: 1;
    text-align: center;
}

.btn-icon-box {
    background: rgba(0, 0, 0, 0.15);
    /* Slightly darker divider effect */
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
}

.btn-copy-split.active {
    background: #fff;
    /* Flash white or different color on copy */
    color: var(--primary);
}

.badge {
    font-size: 0.7rem;
    color: var(--primary);
    background: var(--primary-dim);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ENTROPY METER */
.entropy-meter-container {
    margin-top: 10px;
}

.entropy-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.entropy-status {
    color: var(--primary);
    font-weight: bold;
}

.progress-bar-bg {
    height: 6px;
    background: #222;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff3333, #ffbb33, var(--primary));
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.entropy-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: #444;
    text-transform: uppercase;
}

/* CONTROLS ROW */
.controls-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .controls-row {
        grid-template-columns: 1fr 1fr;
    }
}

.control-card,
.options-card {
    height: 100%;
}

.control-card h3,
.options-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* SLIDER */
.length-display {
    margin-bottom: 20px;
}

.length-number {
    font-size: 3rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid #333;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: super;
}

.slider-container input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    margin-bottom: 10px;
}

.slider-container input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
    transition: transform 0.2s;
}

.slider-container input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-labels {
    position: relative;
    height: 20px;
    /* Space for labels */
    font-size: 0.7rem;
    color: #555;
    font-family: var(--font-mono);
    margin-top: 5px;
}

.label-min {
    position: absolute;
    left: 0;
}

.label-max {
    position: absolute;
    right: 0;
}

.label-mid {
    position: absolute;
    left: 42.86%;
    /* (32-8)/(64-8) = 24/56 = ~42.86% */
    transform: translateX(-50%);
    color: var(--text-muted);
    /* Distinct color if needed, or same */
}

/* TOGGLES */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #121212;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-row:hover {
    background: #181818;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.char-icon {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.8rem;
    width: 24px;
}

.toggle-input {
    display: none;
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: #333;
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-input:checked+.toggle-switch {
    background: var(--primary);
}

.toggle-input:checked+.toggle-switch::after {
    transform: translateX(20px);
}

/* BUTTONS */
.actions-row {
    display: flex;
    gap: 15px;
}

.btn {
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    flex: 2;
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: #33ff66;
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    flex: 1;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-dim);
}

/* SIDEBAR */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Ensure sidebar fills grid cell */
    justify-content: space-between;
    /* Push icons to bottom */
}

.analysis-card {
    border-top: 2px solid var(--primary);
    /* Add matching green line */
    background: var(--bg-card);
    /* Ensure consistency */
    flex: 1;
    /* Stretch to fill space matching left content */
    display: flex;
    flex-direction: column;
}

.footer-info {
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.live-dot {
    font-size: 0.6rem;
    color: var(--primary);
}

.crack-time-display {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 20px;
}

.label-small {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.time-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
}

.time-unit {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
}

.algo-badge {
    display: inline-block;
    font-size: 0.6rem;
    background: #111;
    border: 1px solid #333;
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--primary);
}

.dot-green {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    margin-right: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 25px;
}

.stat-box {
    background: #111;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.label-tiny {
    display: block;
    font-size: 0.6rem;
    color: #666;
    margin-bottom: 4px;
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.text-green {
    color: var(--primary);
}

.text-yellow {
    color: var(--warning);
}

.vulnerability-scan h4 {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.scan-item {
    margin-bottom: 12px;
}

.scan-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.scan-bar-bg {
    height: 4px;
    background: #222;
    border-radius: 2px;
}

.scan-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 5px var(--primary-glow);
}

.scan-bar-fill.warning {
    background: var(--warning);
    box-shadow: 0 0 5px rgba(255, 187, 51, 0.4);
}

.footer-info {
    margin-top: 20px;
    /* Match gap of actions-row */
    padding-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Center vertically */
    height: 54px;
    /* Matches visual height of .btn-primary (16padding*2 + 16text + bits) approx */
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #0f0f0f;
    /* Requested Frame Color */
    padding: 0 25px;
    border-radius: 8px;
    border: 1px solid #222;
    /* Subtle border for definition */
    width: 100%;
    height: 100%;
    justify-content: center;
}

.social-links a {
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.social-icon {
    width: 30px;
    /* Increased size */
    height: 30px;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}