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

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --border: #2a2a2a;
    --shadow: rgba(0, 0, 0, 0.5);
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
}

.container {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

/* Modal */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px var(--shadow);
}

.modal-content h2 {
    margin-bottom: 8px;
    font-size: 24px;
    font-weight: 600;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form input {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
}

.modal-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-form button {
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-form button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.modal-form .secondary-button {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 12px 16px;
}

.modal-form .secondary-button:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
    box-shadow: none;
}

.modal-form .secondary-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.modal-hint.error {
    color: var(--error);
}

.modal-hint.success {
    color: var(--success);
}

/* Main layout */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    align-items: stretch;
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
}

/* Video section */
.video-section {
    flex: 3 1 0;
    align-self: stretch;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    border: none;
    background: #000;
    overflow: hidden;
    gap: 0;
    height: 100%;
}

.video-section video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 0;
    background: #000;
    object-fit: contain;
    display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-tertiary);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

/* Utilities */
.hidden {
    display: none !important;
}
