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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f7 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 70px;
}

/* ============================================
   NAWIGACJA
   ============================================ */

.navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.nav-logo {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c5aa0;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
}

.nav-menu a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
}

.nav-menu a:hover {
    background: #e3f2fd;
    color: #2c5aa0;
}

.nav-menu a.active {
    background: #2c5aa0;
    color: white;
}

/* ============================================
   GŁÓWNY KONTENER
   ============================================ */

.container {
    max-width: 1200px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.6s ease-in;
    margin: 20px 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    background: linear-gradient(135deg, #e3f2fd 0%, #cfe9f3 100%);
    color: #2c5aa0;
    padding: 25px 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.8em;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}

.header p {
    font-size: 1em;
    opacity: 0.85;
}

/* ============================================
   VIDEO CONTAINER
   ============================================ */

.video-container {
    padding: 15px;
    background: white;
    width: 100%;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    padding: 56.25% 0 0 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 100%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   SEKCJA NAGRAŃ
   ============================================ */

.recordings-container {
    padding: 20px 15px;
    background: white;
}

/* Accordion - Rok */
.year-section {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5fafd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.year-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7fc1 100%);
    color: white;
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.year-header:hover {
    background: linear-gradient(135deg, #1e4180 0%, #2c5aa0 100%);
}

.year-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.year-header .arrow {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.year-header.active .arrow {
    transform: rotate(180deg);
}

.year-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.year-content.active {
    max-height: 10000px;
}

/* Accordion - Miesiąc */
.month-section {
    border-bottom: 1px solid #e0e0e0;
}

.month-section:last-child {
    border-bottom: none;
}

.month-header {
    background: #f5fafd;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
    user-select: none;
}

.month-header:hover {
    background: #e3f2fd;
}

.month-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #2c5aa0;
}

.month-header .arrow {
    width: 20px;
    height: 20px;
    stroke: #2c5aa0;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.month-header.active .arrow {
    transform: rotate(180deg);
}

.month-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.month-content.active {
    max-height: 10000px;
    padding: 15px;
}

/* ============================================
   KARTY NAGRAŃ
   ============================================ */

.recording-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 15px;
}

.recording-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.recording-info {
    padding: 20px;
}

.recording-info h4 {
    color: #2c5aa0;
    font-size: 1em;
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word;
}

.recording-info p {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Odtwarzacz audio */
.audio-player {
    margin: 15px 0;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.audio-player iframe {
    width: 100%;
    height: 80px;
    border: none;
    display: block;
}

.player-placeholder {
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #e3f2fd 0%, #f5fafd 100%);
}

.player-placeholder:hover {
    background: linear-gradient(135deg, #cfe9f3 0%, #e3f2fd 100%);
}

.player-placeholder svg {
    color: #2c5aa0;
    margin-bottom: 8px;
}

.player-placeholder p {
    color: #2c5aa0;
    font-size: 0.85em;
    margin: 0;
    font-weight: 500;
}

/* Grupa przycisków */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-btn,
.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.download-btn {
    background: #2c5aa0;
    color: white;
}

.download-btn:hover {
    background: #1e4180;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

.view-btn {
    background: #f5fafd;
    color: #2c5aa0;
    border: 2px solid #2c5aa0;
}

.view-btn:hover {
    background: #2c5aa0;
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   INFO SEKCJA
   ============================================ */

.info {
    padding: 20px;
    background: #f5fafd;
    text-align: center;
    color: #555;
}

.info p {
    font-size: 0.95em;
    line-height: 1.5;
}

/* ============================================
   LOADER
   ============================================ */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #e3f2fd;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container p {
    color: #2c5aa0;
    font-size: 1.1em;
    font-weight: 500;
    margin: 0;
}

.loading-subtext {
    color: #666 !important;
    font-size: 0.9em !important;
    margin-top: 10px !important;
    font-weight: 400 !important;
}

/* ============================================
   BŁĘDY
   ============================================ */

.loading,
.error {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1em;
}

.error {
    color: #c62828;
}

.error p:first-child {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 10px;
}

.error button:hover {
    background: #1e4180 !important;
    transform: translateY(-2px);
}

.error details {
    max-width: 600px;
    margin: 20px auto;
}

.error code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    word-break: break-all;
}

/* ============================================
   EKRAN LOGOWANIA
   ============================================ */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 450px;
    width: 100%;
    animation: fadeIn 0.6s ease-in;
}

.login-box h2 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 2em;
    font-weight: 600;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1em;
    line-height: 1.5;
}

.login-box input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e3f2fd;
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
}

.login-box input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.login-box input::placeholder {
    color: #999;
}

.login-box button {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2c5aa0 0%, #4a7fc1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.login-box button:hover {
    background: linear-gradient(135deg, #1e4180 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.login-box button:active {
    transform: translateY(0);
}

.login-error {
    color: #c62828;
    margin-top: 15px;
    font-weight: 500;
    min-height: 24px;
    font-size: 0.95em;
    padding: 8px;
    border-radius: 8px;
    background: rgba(198, 40, 40, 0.05);
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

/* Bardzo małe telefony (320px - 400px) */
@media (max-width: 400px) {
    body {
        padding-top: 60px;
    }

    .nav-container {
        padding: 12px 15px;
        gap: 10px;
    }

    .nav-logo {
        font-size: 1.2em;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-menu a {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .container {
        border-radius: 10px;
        margin: 15px 5px;
    }

    .header {
        padding: 20px 15px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header p {
        font-size: 0.9em;
    }

    .video-container {
        padding: 10px;
    }

    .recordings-container {
        padding: 15px 10px;
    }

    .year-header {
        padding: 15px;
    }

    .year-header h2 {
        font-size: 1.3em;
    }

    .month-header {
        padding: 12px 15px;
    }

    .month-header h3 {
        font-size: 1.1em;
    }

    .recording-info {
        padding: 15px;
    }

    .recording-info h4 {
        font-size: 0.95em;
    }

    .button-group {
        flex-direction: column;
    }

    .download-btn,
    .view-btn {
        width: 100%;
        min-width: auto;
    }

    .info {
        padding: 15px;
    }

    .info p {
        font-size: 0.9em;
    }

    /* Login screen */
    .login-box {
        padding: 30px 20px;
    }

    .login-box h2 {
        font-size: 1.6em;
    }

    .login-box p {
        font-size: 0.95em;
    }

    .login-box input,
    .login-box button {
        padding: 12px 15px;
        font-size: 0.95em;
    }
}

/* Małe telefony (401px - 480px) */
@media (min-width: 401px) and (max-width: 480px) {
    body {
        padding-top: 65px;
    }

    .nav-container {
        padding: 13px 15px;
    }

    .nav-logo {
        font-size: 1.3em;
    }

    .nav-menu a {
        padding: 7px 14px;
        font-size: 0.95em;
    }

    .container {
        margin: 15px 8px;
    }

    .header {
        padding: 22px 18px;
    }

    .header h1 {
        font-size: 1.6em;
    }

    .video-container {
        padding: 12px;
    }

    .recordings-container {
        padding: 18px 12px;
    }

    .login-box {
        padding: 35px 25px;
    }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .nav-container {
        padding: 15px;
    }

    .container {
        margin: 20px 15px;
    }

    .header {
        padding: 25px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .video-container {
        padding: 20px;
    }

    .recordings-container {
        padding: 25px;
    }

    .info {
        padding: 25px;
    }

    .info p {
        font-size: 1em;
    }
}

/* Desktop (769px+) */
@media (min-width: 769px) {
    body {
        padding-top: 80px;
    }

    .nav-container {
        padding: 20px 40px;
    }

    .nav-menu {
        gap: 30px;
    }

    .container {
        border-radius: 20px;
        margin: 30px 20px;
    }

    .header {
        padding: 30px;
    }

    .header h1 {
        font-size: 2.5em;
    }

    .header p {
        font-size: 1.1em;
    }

    .video-container {
        padding: 40px;
    }

    .video-wrapper {
        border-radius: 10px;
        transition: transform 0.3s ease;
    }

    .video-wrapper:hover {
        transform: scale(1.02);
    }

    .recordings-container {
        padding: 40px;
    }

    .info {
        padding: 30px 40px;
    }

    .info p {
        font-size: 1.1em;
        line-height: 1.6;
    }
}