

/* Clean minimalist theme with dark background and light blue accents */
.fs42-terminal {
    background: #1a1a1a;
    color: #61afef;
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 0.95em;
    border-radius: 4px;
    border: 1px solid #61afef;
    padding: 1em;
    min-height: 120px;
    line-height: 1.4;
    margin-bottom: 1em;
    white-space: pre-wrap;
}

body {
    background: #0d1117;
    min-height: 100vh;
    color: #e6e6e6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, p, a, li {
    color: #e6e6e6;
}

.custom-menu {
    background: #161b22;
    color: #e6e6e6;
    border-bottom: 1px solid #30363d;
}

.custom-menu .pure-menu-heading {
    color: #61afef;
    font-weight: 500;
    letter-spacing: 1px;
}

.custom-menu .pure-menu-link {
    color: #e6e6e6;
    font-weight: 400;
    transition: color 0.2s;
}

.custom-menu .pure-menu-link:hover {
    color: #61afef;
    background: none;
}

@media (max-width: 48em) {
    .pure-menu-list {
        display: none;
        flex-direction: column;
        margin: 0;
        padding: 0;
    }

    .pure-menu.pure-menu-active .pure-menu-list {
        display: flex;
        background: #161b22;
        position: absolute;
        top: 3.5em;
        left: 0;
        width: 100%;
        z-index: 1000;
        border-bottom: 1px solid #30363d;
    }

    .pure-menu-item {
        width: 100%;
        text-align: left;
    }

    .menu-toggle {
        display: inline-block;
        cursor: pointer;
        color: #61afef;
        padding: 1em;
        font-size: 1.2em;
    }
}

@media (min-width: 48em) {
    .menu-toggle {
        display: none;
    }

    .pure-menu-list {
        display: flex !important;
        position: static;
        background: none;
        width: auto;
        flex-direction: row;
    }
}

.pure-g {
    margin: 2em auto;
    max-width: 1000px;
    padding: 2em;
    background: #161b22;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

#station-summary {
    margin-bottom: 2em;
}

h1, h2 {
    margin-top: 0;
    color: #61afef;
    font-weight: 500;
}

/* Table styles */
.pure-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    background: #1a1a1a;
    color: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
}

.pure-table th {
    background: #161b22;
    color: #61afef;
    font-weight: 500;
    padding: 0.8em 0.5em;
    border-bottom: 1px solid #30363d;
    text-align: left;
}

.pure-table td {
    padding: 0.7em 0.5em;
    text-align: left;
    word-break: break-word;
    border-bottom: 1px solid #30363d;
}

.pure-table tr:last-child td {
    border-bottom: none;
}

/* Mobile-optimized table styles */
@media (max-width: 600px) {
    .pure-table, .pure-table tbody {
        display: block;
        width: 100%;
    }

    .pure-table thead {
        display: none;  /* Hide headers on mobile */
    }

    .pure-table tr {
        display: block;
        margin-bottom: 1em;
        background: #1f242c;
        border-radius: 4px;
        border: 1px solid #30363d;
    }

    .pure-table td {
        display: block;
        padding: 0.6em;
        border: none;
        border-bottom: 1px solid #30363d;
    }

    .pure-table td:last-child {
        border-bottom: none;
    }

    /* Add header labels on mobile */
    .pure-table td:before {
        content: attr(data-label);
        display: block;
        color: #61afef;
        font-size: 0.85em;
        margin-bottom: 0.3em;
    }

    /* Special styling for schedule blocks */
    #schedule-table .pure-table td {
        white-space: normal;  /* Allow text to wrap */
        font-size: 0.9em;
    }

    /* Special styling for catalog entries */
    #catalog-table .pure-table td {
        white-space: normal;
        font-size: 0.9em;
    }
}

/* Button styles */
.pure-button {
    background: #1f242c;
    color: #61afef;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 0.5em 1em;
    font-size: 0.9em;
    transition: all 0.2s;
}

.pure-button:hover {
    background: #2c313a;
    border-color: #61afef;
}

.pure-button-primary {
    background: #61afef;
    color: #0d1117;
    border: none;
}

.pure-button-primary:hover {
    background: #4b8cc7;
    border: none;
}

/* Form elements */
select, input, textarea {
    background: #1f242c !important;
    color: #e6e6e6 !important;
    border: 1px solid #30363d;
    border-radius: 4px;
    padding: 0.7em;
    font-size: 0.95em;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%2361afef' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7em center;
    background-size: 0.65em auto;
    padding-right: 2.5em;
}

select option {
    background: #1f242c;
    color: #e6e6e6;
}

select:focus, input:focus, textarea:focus {
    border-color: #61afef;
    outline: none;
    box-shadow: 0 0 0 3px rgba(97, 175, 239, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

label {
    display: block;
    color: #61afef;
    font-weight: 500;
    margin-bottom: 0.5em;
    margin-top: 1em;
    font-size: 0.9em;
}

label:first-child {
    margin-top: 0;
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

/* Form containers */
.pure-form fieldset {
    background: #161b22;
    padding: 1.5em;
    border-radius: 6px;
    border: 1px solid #30363d;
    margin-bottom: 1em;
}

@media (max-width: 600px) {
    .pure-g {
        padding: 1em;
        margin: 1em;
    }

    .pure-button {
        margin: 0.5em 0;
    }

    .fs42-terminal {
        font-size: 0.85em;
        padding: 0.8em;
    }

    /* Improve spacing in mobile view */
    #station-select-frame {
        flex-direction: column;
        align-items: stretch;
    }

    #station-select-frame select,
    #station-select-frame button {
        margin: 0.5em 0;
        width: 100%;
        max-width: none;
    }

    #station-select-frame label {
        margin-bottom: 0.5em;
    }
}

/* Remote Control Styles */
.remote-container {
    max-width: 320px;
    margin: 0 auto;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 25px;
    padding: 30px 20px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.1),
        inset 0 -2px 5px rgba(0, 0, 0, 0.3);
    border: 2px solid #333;
    min-height: 100vh;
    box-sizing: border-box;
}

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

.remote-brand {
    text-align: left;
    color: #61afef;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(97, 175, 239, 0.3);
    flex: 1;
}

.remote-screen {
    background: #0a0a0a;
    border: 2px inset #333;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 25px;
    text-align: center;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8);
}

.button-grid {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.power-section {
    grid-template-columns: 1fr;
    margin-bottom: 15px;
}

.number-pad {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 15px;
}

.volume-channel-section {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    margin-bottom: 15px;
    gap: 12px;
}


.function-section {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 15px;
}

.now-playing {
    background: #1a1a1a;
    border: 2px inset #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.now-playing-label {
    color: #61afef;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px rgba(97, 175, 239, 0.3);
}

.now-playing-network {
    color: #61afef;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    min-height: 15px;
    text-shadow: 0 0 5px rgba(97, 175, 239, 0.3);
}

.now-playing-status {
    color: #ffff00;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
    min-height: 13px;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.3);
}

.now-playing-title {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    margin-bottom: 0;
    min-height: 12px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.remote-btn {
    background: linear-gradient(145deg, #404040, #2a2a2a);
    border: 2px outset #555;
    border-radius: 8px;
    color: #e6e6e6;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 8px;
    min-height: 45px;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
    user-select: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-btn:active {
    background: linear-gradient(145deg, #2a2a2a, #404040);
    border: 2px inset #555;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
    transform: translateY(1px);
}

.remote-btn:hover {
    background: linear-gradient(145deg, #4a4a4a, #343434);
}

.power-btn {
    background: linear-gradient(145deg, #8b0000, #660000);
    color: #ffcccc;
    font-size: 14px;
    width: 80px;
    height: 50px;
}

.power-btn:hover {
    background: linear-gradient(145deg, #a00000, #750000);
}

.number-btn {
    width: 60px;
    height: 60px;
    font-size: 16px;
    border-radius: 50%;
}

.zero-btn {
    grid-column: 2;
}


.channel-btn, .volume-btn {
    width: 80px;
    height: 50px;
}

.function-btn {
    width: 120px;
    height: 35px;
    font-size: 10px;
}

/* Remote Control Mobile optimizations */
@media (max-width: 480px) {
    .remote-container {
        max-width: 100%;
        padding: 15px 10px;
        margin: 0;
        border-radius: 0;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }
    
    .button-grid {
        max-width: 280px;
        width: 100%;
        gap: 8px;
        margin-bottom: 8px;
    }

    .remote-btn {
        min-height: 40px;
        min-width: 50px;
        font-size: 11px;
        padding: 10px 6px;
    }

    .number-btn {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }


    .channel-btn, .volume-btn {
        width: 70px;
        height: 45px;
    }

    .function-btn {
        width: 100px;
        height: 30px;
        font-size: 9px;
    }

    .power-btn {
        width: 70px;
        height: 45px;
        font-size: 12px;
    }

    .now-playing {
        max-width: 280px;
        width: 100%;
        min-width: 280px;
        margin: 8px auto;
        padding: 10px;
    }

    .remote-header {
        max-width: 280px;
        width: 100%;
        margin: 0 auto 8px auto;
    }

    .power-btn {
        min-width: 60px;
        height: 35px;
        font-size: 10px;
        padding: 8px 12px;
    }

    .remote-screen {
        padding: 8px;
        margin-bottom: 15px;
        font-size: 14px;
        min-height: 25px;
        max-width: 280px;
        width: 100%;
        margin: 0 auto 15px auto;
    }
}

/* Remote Control Extra small screens */
@media (max-width: 320px) {
    .remote-container {
        max-width: 100%;
        padding: 15px 10px;
    }

    .button-grid {
        gap: 6px;
    }

    .now-playing {
        max-width: 280px;
        width: 100%;
        min-width: 260px;
        margin: 10px auto;
        padding: 12px;
    }
}

