/* Recorded page - groups grid, file list, player overlay */

.recorded-groups {
    max-width: 900px;
    margin: 15px auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.recorded-files {
    margin-top: 5px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .recorded-files {
        grid-template-columns: 1fr 1fr;
    }
}

.recorded-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: slideIn 0.3s ease;
}

.recorded-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 20px -5px rgba(0, 0, 0, 0.5);
}

.recorded-thumb {
    width: 90px;
    height: 65px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
}

.audio-placeholder {
    background: linear-gradient(135deg, #2a0038, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent, #bd00ff);
    font-size: 24px;
    border: 1px solid rgba(189, 0, 255, 0.3);
}

.recorded-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: center;
    padding-right: 30px;
}

.recorded-title {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.recorded-card:hover .recorded-title {
    mask-image: linear-gradient(to right, black 90%, transparent);
}

.recorded-meta {
    font-size: 11px;
    color: #94a3b8;
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recorded-sub {
    margin-left: auto;
    font-size: 10px;
    opacity: 0.7;
}

.recorded-dl {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
    z-index: 5;
}

.recorded-dl:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.1);
}

.badge-vid {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    background: rgba(0, 242, 255, 0.1);
    color: var(--primary);
}

.badge-aud {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    background: rgba(189, 0, 255, 0.1);
    color: var(--accent, #bd00ff);
}

/* Player Overlay */
.player-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.player-overlay.active {
    opacity: 1;
    visibility: visible;
}

.player-header-bar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent);
    z-index: 10;
    gap: 10px;
    flex-shrink: 0;
}

.player-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    flex-shrink: 0;
}

.player-close-btn:hover {
    background: #ff4757;
    color: #fff;
}

.player-title {
    flex: 1;
    color: white;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.player-action-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.player-action-btn:hover {
    background: var(--primary);
    color: #000;
}

.player-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 0;
    background: #000;
}

.player-body.audio-mode {
    background: radial-gradient(circle, #1a0b2e 0%, #000 100%);
}

.audio-visualizer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.audio-icon-large {
    font-size: 80px;
    color: var(--accent, #bd00ff);
    filter: drop-shadow(0 0 20px var(--accent, #bd00ff));
    margin-bottom: 20px;
}

.audio-bars {
    display: flex;
    gap: 5px;
    height: 50px;
    align-items: center;
}

.audio-bars .bar {
    width: 6px;
    background: var(--accent, #bd00ff);
    border-radius: 3px;
    animation: wave 1s ease-in-out infinite;
}

.audio-bars .bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bars .bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bars .bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bars .bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0% { height: 5px; }
    50% { height: 25px; }
    100% { height: 5px; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reuse grid-view from materials */
.recorded-groups .grid-view {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 600px) {
    .recorded-groups .grid-view {
        grid-template-columns: repeat(4, 1fr);
    }
}

.recorded-groups .subject-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.recorded-groups .subject-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(0, 242, 255, 0.2);
}

.recorded-groups .subject-card .card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    transition: 0.3s;
}

.recorded-groups .subject-card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px var(--primary));
}

.recorded-groups .subject-card .card-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-align: center;
    z-index: 2;
}

.loading-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 50px;
    font-family: 'Fira Code', monospace;
}
