/**
 * Data Leak Visualization - Styles
 * Separated for CSP compliance and SRI integrity
 */

.leak-demo {
    min-height: 200vh;
    padding: 80px 5% 4rem;
    background: linear-gradient(180deg, #030308 0%, #0a0a15 100%);
    position: relative;
    overflow: hidden;
}

/* The headline container */
.breach-letter-container {
    position: relative;
    display: block;
    text-align: center;
}

.breach-line {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    font-weight: 700;
    user-select: none;
    white-space: nowrap;
}

.breach-line.large {
    font-size: clamp(32px, 10vw, 140px);
    line-height: 1.1;
    background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breach-line.small {
    font-size: clamp(14px, 3vw, 40px);
    line-height: 1.4;
    margin-top: 0.5em;
    color: rgba(148, 163, 184, 0.8);
}

.breach-letter-wrap {
    position: relative;
    display: inline-block;
}

.breach-letter {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    font-size: clamp(32px, 10vw, 140px);
    font-weight: 700;
    background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    user-select: none;
    line-height: 1;
}

.breach-text {
    font-family: 'Inter', 'SF Pro Display', sans-serif;
    font-size: clamp(80px, 12vw, 160px);
    font-weight: 700;
    color: rgba(6, 182, 212, 0.15);
    user-select: none;
    vertical-align: baseline;
}

/* Leak point indicator - positioned inside the bottom of the 'l' */
.leak-point {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.9) 0%, rgba(8, 145, 178, 0.4) 40%, transparent 70%);
    border-radius: 50%;
}

.leak-point.hidden {
    opacity: 0;
}

/* Particle container - absolute for container-relative positioning */
#particle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    pointer-events: none;
    z-index: 100;
}

.particle {
    position: absolute;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #0891b2;
    text-shadow: 0 0 8px rgba(8, 145, 178, 0.6);
    pointer-events: auto;
    user-select: none;
    will-change: transform;
}

/* Pooling containers */
.pooling-zone {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 300px;
    padding: 0 2rem;
}

.pool-container {
    position: relative;
    width: 180px;
    height: 120px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.pool-container.wide {
    width: calc(180px * 2 + 2rem);
}

.pool-surface {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
}

.pool-label {
    padding: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Info panel */
.info-panel {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    max-width: 280px;
    z-index: 200;
}

.info-panel h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.info-panel p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.info-panel .stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.info-panel .stats strong {
    color: #0891b2;
}

/* Physics Control Panel */
#physics-panel {
    position: fixed;
    top: 60px;
    right: 1rem;
    z-index: 10000;
    font-size: 0.75rem;
}

#panel-toggle {
    background: rgba(8, 145, 178, 0.9);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
}

#panel-toggle:hover {
    background: rgba(8, 145, 178, 1);
}

.panel-content {
    display: none;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
    width: 260px;
}

.panel-content.open {
    display: block;
}

.control-row {
    display: grid;
    grid-template-columns: 90px 1fr 45px;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.control-row label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
}

.control-row input[type="range"] {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #0891b2;
    border-radius: 50%;
    cursor: pointer;
}

.control-row .value {
    color: #0891b2;
    font-family: 'SF Mono', monospace;
    font-size: 0.7rem;
    text-align: right;
}

#apply-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: #0891b2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
}

#apply-btn:hover {
    background: #06b6d4;
}

.control-divider {
    color: rgba(8, 145, 178, 0.8);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0.75rem 0 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-row {
    grid-template-columns: 90px 1fr 45px;
}

.toggle-switch {
    display: flex;
    gap: 2px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 2px;
}

.toggle-btn {
    flex: 1;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.toggle-btn.active {
    background: #0891b2;
    color: white;
}

.toggle-btn.active.pull-mode {
    background: #f59e0b;
}

/* Numeric input for spawn rate */
.numeric-row {
    grid-template-columns: 90px 60px 1fr;
}

.numeric-input {
    width: 60px;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #0891b2;
    font-family: 'SF Mono', monospace;
    font-size: 0.75rem;
    text-align: center;
}

.numeric-input:focus {
    outline: none;
    border-color: #0891b2;
}

.numeric-input::-webkit-inner-spin-button,
.numeric-input::-webkit-outer-spin-button {
    opacity: 1;
}

.warning-text {
    color: #f59e0b;
    font-size: 0.65rem;
    font-weight: 500;
}
