/* Home Page Specific Styles */

/* Top Section Layout */
.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

/* Terminal Styles */
.terminal {
    background: var(--term-bg);
    border: 1px solid var(--term-border);
    border-radius: 4px;
    padding: 1.5rem;
    box-shadow: var(--shadow-subtle);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.terminal:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.terminal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--term-border);
    color: var(--term-header);
}

.terminal-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.5;
    background: #888;
}

.terminal-body {
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    color: var(--term-text);
    font-size: 0.9rem;
    flex: 1;
    overflow-y: auto;
    line-height: 1.6;
}

.terminal-line {
    margin: 0.5rem 0;
    animation: typewriter 0.5s steps(40);
}

.terminal-prompt {
    color: var(--term-prompt);
}

.terminal-cursor {
    display: inline-block;
    width: 0.45em;
    height: 1.15em;
    background: var(--term-accent);
    animation: cursor-blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
    box-shadow: 0 0 8px var(--term-accent);
}

.terminal-input {
    display: flex;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--term-border);
    position: relative;
}

.terminal-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--term-accent);
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    font-size: 0.9rem;
    outline: none;
    caret-color: transparent;
    position: relative;
}

.terminal-input::after {
    content: '';
    position: absolute;
    left: calc(165px + var(--cursor-position, 0px));
    width: 0.45em;
    height: 1.15em;
    background: var(--term-accent);
    animation: cursor-blink 1s step-end infinite;
    pointer-events: none;
    box-shadow: 0 0 8px var(--term-accent);
}

/* Radio Player Styles */
.radio {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

body.dark .radio {
    background: var(--glass-dark);
    border-color: var(--border-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.radio:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.radio-display {
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    text-align: center;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 3px;
    min-width: 80%;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

body.dark .radio-display {
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-dark);
}

.radio-visualizer {
    display: flex;
    gap: 5px;
    align-items: flex-end;
    height: 60px;
    z-index: 1;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

body.dark .radio-visualizer {
    background: rgba(255, 255, 255, 0.03);
}

/* Bars are full-height slots; radio.js drives .radio-bar-fill / .radio-bar-peak. */
.radio-bar {
    position: relative;
    width: 5px;
    height: 100%;
    border-radius: 1px;
}

.radio-bar-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0;
    background: var(--accent-primary);
    border-radius: inherit;
    opacity: 0.6;
}

.radio-bar-peak {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.12s linear;
}

.radio-controls {
    display: flex;
    gap: 1rem;
    z-index: 1;
}

.radio-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.radio-btn#playBtn {
    background: #ff8c42;
    color: #fff;
}

.radio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.radio-btn#playBtn:hover {
    background: #ff9d5c;
}

.radio-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.radio-stations {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    z-index: 1;
}

.station-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    font-size: 0.75rem;
    border-radius: 3px;
    position: relative;
    z-index: 1;
}

body.dark .station-btn {
    border-color: var(--border-dark);
}

.station-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    border-color: var(--accent-primary);
}

body.dark .station-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dark);
}

.station-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* Posts Section */
.posts-section {
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.filters {
    padding: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-light);
}

body.dark .filters {
    border-bottom-color: var(--border-dark);
}

.posts-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

a.post-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 2px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark .post-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-dark);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-primary);
}

.post-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.post-card .post-title {
    font-family: 'IBM Plex Mono', 'Noto Sans SC', monospace;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

body.dark .post-card .post-title {
    color: var(--text-dark);
}

.post-card .post-meta {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.post-excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 968px) {
    .top-section {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}
