/* style.css – Ciemny motyw dla HHDNS RadioRec z logowaniem */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Strona logowania */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-form {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #00d4ff;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #aaa;
    font-size: 0.9rem;
}

.error-message {
    background-color: #dc3545;
    color: white;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background-color: #00d4ff;
    color: #1a1a1a;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #0099cc;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

.login-footer p {
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

/* Nagłówek z informacjami o użytkowniku */
.header {
    background-color: #2d2d2d;
    border-bottom: 2px solid #444;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: #00d4ff;
    font-size: 1.5rem;
    font-weight: bold;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #e0e0e0;
}

.user-info span {
    font-size: 0.9rem;
}

.logout-link {
    color: #dc3545;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #dc3545;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.logout-link:hover {
    background-color: #dc3545;
    color: white;
}

/* Nawigacja */
.nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #444;
    color: #00d4ff;
}

/* Dashboard */
.dashboard {
    padding: 2rem 0;
}

.actions {
    margin-bottom: 2rem;
}

.actions button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #444;
    color: #e0e0e0;
    transition: background-color 0.2s;
}

.actions button:hover {
    background-color: #555;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.station-card {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
    transition: transform 0.2s, border-color 0.2s;
}

.station-card:hover {
    transform: translateY(-2px);
    border-color: #00d4ff;
}

.station-card h3 {
    margin-bottom: 0.5rem;
    color: #00d4ff;
}

.station-card .active {
    color: #28a745;
    font-weight: bold;
}

.station-card .inactive {
    color: #dc3545;
    font-weight: bold;
}

.station-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.station-controls button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.station-controls .start {
    background-color: #00d4ff;
    color: #1a1a1a;
}

.station-controls .stop {
    background-color: #dc3545;
    color: #fff;
}

.station-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.msg {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.2em;
}

/* Kalendarz */
.calendar-section {
    padding: 2rem 0;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.calendar-controls button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #444;
    color: #e0e0e0;
}

.calendar-controls button:hover {
    background-color: #555;
}

.calendar-controls select {
    padding: 0.5rem;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

#currentMonth {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00d4ff;
    min-width: 200px;
}

.calendar {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1rem;
    width: 100%;
}

.day-header {
    padding: 0.5rem;
    text-align: center;
    background-color: #444;
    color: #00d4ff;
    font-weight: bold;
    min-width: 0;
}

.day-header.sunday {
    background-color: #5a2d2d;
    color: #ff6b6b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    width: 100%;
}

.calendar-day {
    padding: 0.5rem;
    text-align: center;
    background-color: #333;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    min-height: 40px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background-color: #444;
}

.calendar-day.current-month {
    background-color: #2d2d2d;
}

.calendar-day.other-month {
    color: #666;
}

.calendar-day.has-recordings {
    background-color: #004d66;
    color: #00d4ff;
    font-weight: bold;
}

.calendar-day.has-recordings:hover {
    background-color: #005580;
}

.calendar-day.sunday {
    background-color: #3d2626;
    color: #ff9999;
}

.calendar-day.sunday.current-month {
    background-color: #4a2d2d;
    color: #ffaaaa;
}

.calendar-day.sunday.has-recordings {
    background-color: #664d2d;
    color: #ffcc99;
    font-weight: bold;
}

.calendar-day.sunday.has-recordings:hover {
    background-color: #775a33;
}

.calendar-day.sunday:hover {
    background-color: #553333;
}

.recording-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background-color: #00d4ff;
    border-radius: 50%;
}

/* Nagrania dnia */
.day-recordings {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.recordings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recording-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #333;
    border-radius: 4px;
}

.recording-info strong {
    color: #00d4ff;
}

.recording-info small {
    color: #aaa;
}

.recording-actions {
    display: flex;
    gap: 0.5rem;
}

.recording-actions button,
.recording-actions a {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    background-color: #00d4ff;
    color: #1a1a1a;
    transition: background-color 0.2s;
    min-width: 80px;
    text-align: center;
}

.recording-actions button:hover,
.recording-actions a:hover {
    background-color: #0099cc;
}

/* Odtwarzacz kalendarza */
.calendar-audio-player {
    background-color: #2d2d2d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    position: relative;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.player-header h3 {
    color: #00d4ff;
    margin: 0;
}

.close-player {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-player:hover {
    background-color: #555;
}

.calendar-audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

.calendar-audio-player .now-playing {
    text-align: center;
    color: #00d4ff;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Odtwarzacz */
.player-section {
    padding: 2rem 0;
}

.player-controls {
    margin-bottom: 2rem;
}

.date-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-selector input,
.date-selector select {
    padding: 0.5rem;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #2d2d2d;
    color: #e0e0e0;
}

.date-selector button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #00d4ff;
    color: #1a1a1a;
}

.date-selector button:hover {
    background-color: #0099cc;
}

.playlist {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.playlist-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.playlist-item {
    padding: 1rem;
    background-color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.playlist-item:hover {
    background-color: #444;
}

.playlist-item.active {
    background-color: #004d66;
    border-left: 4px solid #00d4ff;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.track-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00d4ff;
}

.track-details {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.3;
}

.playlist-item.active .track-time {
    color: #fff;
}

.playlist-item.active .track-details {
    color: #ccc;
}

.playlist-item:hover .track-time {
    color: #33e6ff;
}

.audio-player {
    background-color: #2d2d2d;
    border-radius: 8px;
    padding: 1rem;
}

.audio-player audio {
    width: 100%;
    margin-bottom: 1rem;
}

.now-playing {
    text-align: center;
    color: #00d4ff;
    font-weight: bold;
}

/* Komunikat informacyjny */
.info-message {
    background-color: #00d4ff;
    color: #1a1a1a;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Strona wylogowania */
.logout-message {
    text-align: center;
    margin-bottom: 2rem;
}

.logout-icon {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.logout-message h2 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.logout-message p {
    color: #e0e0e0;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.logout-message strong {
    color: #00d4ff;
}

.logout-actions {
    margin-bottom: 2rem;
}

.logout-actions .login-button {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    width: 100%;
}

.logout-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

.logout-footer p {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Responsywność dla komunikatów */
@media (max-width: 768px) {
    .logout-message h2 {
        font-size: 1.2rem;
    }
    
    .logout-message p {
        font-size: 0.9rem;
    }
    
    .logout-icon svg {
        width: 36px;
        height: 36px;
    }
}

/* Usuń stare style .login-footer jeśli były */
.login-footer {
    display: none; /* Ukryj stary footer z informacjami o PAM */
}



/* Responsywność */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .calendar-controls,
    .date-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .recording-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .recording-actions {
        justify-content: flex-start;
    }
    
    .calendar-day {
        padding: 0.25rem;
        font-size: 0.8rem;
        min-height: 35px;
    }
    
    .recording-indicator {
        width: 4px;
        height: 4px;
    }
    
    .track-time {
        font-size: 1rem;
    }
    
    .track-details {
        font-size: 0.8rem;
    }
    
    .calendar,
    .day-recordings,
    .calendar-audio-player {
        max-width: 100%;
        padding: 0.5rem;
    }
    
    #currentMonth {
        min-width: 150px;
        font-size: 1rem;
    }
    
    .calendar-audio-player {
        padding: 0.5rem;
    }
    
    .player-header h3 {
        font-size: 1rem;
    }
    
    .login-container {
        padding: 1rem;
    }
}
