/**
 * me-tube Frontend Styles
 * Custom styles to complement system.css retro UI framework
 */

body {
    background: #c0c0c0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

fieldset {
    margin-bottom: 30px;
}

.container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.window {
    margin: 0 auto;
    width: 100%;
}

.info-text {
    text-align: center;
    margin: 10px 0 20px 0;
    font-style: italic;
}

/* Status messages */
.status {
    margin-top: 10px;
    padding: 8px;
    display: none;
    border: 2px solid;
    background: white;
}

.status.show {
    display: block;
}

.status.success {
    border-color: #000;
}

.status.error {
    border-color: #000;
    background: #fff;
}

.status.info {
    border-color: #000;
}

/* Loading animation */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.loading-dots::after {
    content: '...';
    animation: blink 1.5s infinite;
}

/* Progress bar */
.progress-container {
    margin-top: 10px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: white;
    border: 2px solid black;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Video list */
.video-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid black;
    background: white;
    padding: 8px;
}

.video-item {
    padding: 8px;
    border: 2px solid black;
    background: white;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.video-item:last-child {
    margin-bottom: 0;
}

.video-item.pinned {
    border: 3px solid black;
    background: #f0f0f0;
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-weight: bold;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.video-meta {
    font-size: 0.85rem;
}

.video-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.video-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.delete-link {
    color: black;
    text-decoration: underline;
    cursor: pointer;
}

.delete-link:hover {
    text-decoration: none;
}

.download-link, button.download-link {
    text-decoration: none;
    color: black;
    border: 2px solid black;
    padding: 2px 8px;
    background: white;
    display: inline-block;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.download-link:hover, button.download-link:hover {
    background: black;
    color: white;
}

.loading {
    text-align: center;
    padding: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Footer */
.footer-section {
    padding: 10px 0;
}

.version-text {
    font-size: 0.75rem;
    font-family: monospace;
}

.version-text a, a.version-text {
    color: #000;
    text-decoration: underline;
}

.version-text a:hover, a.version-text:hover {
    text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        max-width: 100%;
    }

    .video-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-actions {
        width: 100%;
    }

    .download-link {
        flex: 1;
        text-align: center;
    }
}
