/* BOTB VHS-Inspired Elements */

/* =========================================
   VHS TAPE LABEL HEADER
   ========================================= */
.vhs-label {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    position: relative;
    overflow: hidden;
}

.vhs-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(
        180deg,
        var(--stripe-1) 0%,
        var(--stripe-1) 25%,
        var(--stripe-2) 25%,
        var(--stripe-2) 50%,
        var(--stripe-3) 50%,
        var(--stripe-3) 75%,
        var(--stripe-4) 75%,
        var(--stripe-4) 100%
    );
}

.vhs-label-content {
    margin-left: var(--space-md);
}

.vhs-label-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
}

.vhs-label-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   VHS SPINE STYLE
   ========================================= */
.vhs-spine {
    background: linear-gradient(
        90deg,
        var(--surface) 0%,
        var(--surface) 10%,
        var(--stripe-1) 10%,
        var(--stripe-1) 12%,
        var(--stripe-2) 12%,
        var(--stripe-2) 14%,
        var(--stripe-3) 14%,
        var(--stripe-3) 16%,
        var(--stripe-4) 16%,
        var(--stripe-4) 18%,
        var(--surface) 18%,
        var(--surface) 100%
    );
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
}

/* =========================================
   VHS TRACKING LINES
   ========================================= */
.vhs-tracking {
    position: relative;
    overflow: hidden;
}

.vhs-tracking::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        var(--vhs-scanline) 3px,
        var(--vhs-scanline) 4px
    );
    pointer-events: none;
    opacity: 0.3;
}

/* Animated tracking effect */
.vhs-tracking-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
    );
    animation: tracking-line 3s ease-in-out infinite;
}

@keyframes tracking-line {
    0% { transform: translateY(-100%); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(3000%); opacity: 0; }
}

/* =========================================
   VHS REEL WINDOW
   ========================================= */
.vhs-reel {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--vinyl-black);
    position: relative;
    border: 3px solid var(--accent);
}

.vhs-reel::before,
.vhs-reel::after {
    content: '';
    position: absolute;
    border-radius: var(--radius-full);
}

.vhs-reel::before {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--accent);
}

.vhs-reel::after {
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px dashed var(--accent);
    animation: reel-spin 4s linear infinite;
}

@keyframes reel-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================================
   VHS CASE TEXTURE
   ========================================= */
.vhs-case {
    background: var(--surface);
    background-image:
        linear-gradient(90deg, transparent 49%, var(--border) 49%, var(--border) 51%, transparent 51%),
        linear-gradient(0deg, transparent 49%, var(--border) 49%, var(--border) 51%, transparent 51%);
    background-size: 20px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
}

.vhs-case::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--stripe-1),
        var(--stripe-2),
        var(--stripe-3),
        var(--stripe-4)
    );
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* =========================================
   VHS TIMESTAMP
   ========================================= */
.vhs-timestamp {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.vhs-timestamp::before {
    content: 'REC';
    color: var(--error);
    font-weight: 600;
    animation: rec-blink 1s ease-in-out infinite;
}

@keyframes rec-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* =========================================
   VHS PLAY/PAUSE INDICATOR
   ========================================= */
.vhs-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.vhs-indicator-icon {
    width: 12px;
    height: 12px;
}

.vhs-indicator.play .vhs-indicator-icon {
    border-left: 10px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.vhs-indicator.pause .vhs-indicator-icon {
    background: linear-gradient(
        90deg,
        white 0%,
        white 35%,
        transparent 35%,
        transparent 65%,
        white 65%,
        white 100%
    );
}

/* =========================================
   VHS NOISE EFFECT
   ========================================= */
.vhs-noise {
    position: relative;
}

.vhs-noise::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.3;
}

/* =========================================
   VHS GLITCH EFFECT (On Hover)
   ========================================= */
.vhs-glitch {
    position: relative;
}

.vhs-glitch:hover {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* =========================================
   VHS SECTION DIVIDER
   ========================================= */
.vhs-divider {
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--stripe-1) 10%,
        var(--stripe-2) 30%,
        var(--stripe-3) 50%,
        var(--stripe-4) 70%,
        transparent 100%
    );
    margin: var(--space-xl) 0;
    border-radius: 2px;
}

/* =========================================
   VHS BADGE/TAG
   ========================================= */
.vhs-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.vhs-badge.active {
    border-left-color: var(--success);
    color: var(--success);
}

.vhs-badge.pending {
    border-left-color: var(--warning);
    color: var(--warning);
}

.vhs-badge.completed {
    border-left-color: var(--accent-gold);
    color: var(--accent-gold);
}
