/* Apple //e Emulator - Layout Styles
   Header, main content area, and footer
*/

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-medium);
    border-bottom: 1px solid var(--border-default);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-image {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.app-version {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 2px 6px;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: var(--space-md);
    border-left: 1px solid var(--border-default);
}

/* RetroTech71 branding */
.retro-brand {
    display: flex;
    align-items: center;
    padding-left: var(--space-md);
    border-left: 1px solid var(--border-muted);
    text-decoration: none;
    position: relative;
}

.retro-brand-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: #33ff33;
    text-shadow:
        0 0 4px rgba(51, 255, 51, 0.6),
        0 0 11px rgba(51, 255, 51, 0.3),
        0 0 22px rgba(51, 255, 51, 0.15);
    position: relative;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.retro-brand:hover .retro-brand-text {
    color: #66ff66;
    text-shadow:
        0 0 6px rgba(51, 255, 51, 0.8),
        0 0 16px rgba(51, 255, 51, 0.5),
        0 0 30px rgba(51, 255, 51, 0.25);
}

/* Subtle scanline overlay on hover */
.retro-brand-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    right: -2px;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.retro-brand:hover .retro-brand-text::after {
    opacity: 1;
}

/* Gentle pulse animation */
@keyframes phosphor-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.retro-brand-text {
    animation: phosphor-pulse 3s ease-in-out infinite;
}

/* Light theme: darker green for readability on light backgrounds */
html[data-theme="light"] .retro-brand-text {
    color: #0a8a2e;
    text-shadow:
        0 0 4px rgba(10, 138, 46, 0.3),
        0 0 11px rgba(10, 138, 46, 0.15);
}

html[data-theme="light"] .retro-brand:hover .retro-brand-text {
    color: #0d7a2b;
    text-shadow:
        0 0 6px rgba(10, 138, 46, 0.5),
        0 0 16px rgba(10, 138, 46, 0.25);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.control-group {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0 var(--space-xs);
    margin-left: var(--space-xs);
    border-left: 1px solid var(--border-muted);
}

/* Main content */
main {
    display: flex;
    flex: 1;
    padding: var(--space-md);
    gap: var(--space-md);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 0;
}

.emulator-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
}

/* Footer */
footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-medium);
    border-top: 1px solid var(--border-default);
    font-size: 0.75rem;
    color: var(--text-muted);
}

footer .separator {
    color: var(--border-default);
}

footer kbd {
    background: var(--bg-light);
    border: 1px solid var(--border-default);
    border-radius: 3px;
    padding: 1px 6px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
}

footer .footer-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: color 0.15s, text-decoration-color 0.15s;
}

footer .footer-link:hover {
    color: var(--text-secondary);
    text-decoration-color: var(--text-secondary);
}
