@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Login Page */
.login-container {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.login-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f172a;
    color: var(--text-main);
    outline: none;
    transition: border 0.2s;
}

.input-group input:focus {
    border-color: var(--accent);
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 600;
}

button:hover {
    background-color: var(--accent-hover);
}

.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
    display: none;
}

/* Stream Page */
.dashboard {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
    padding-bottom: 1rem;
}

.header h1 {
    font-size: 1.8rem;
}

.header .logout {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.header .logout:hover {
    color: var(--danger);
}

.stream-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 400px;
}

#stream-img {
    width: 100%;
    height: auto;
    display: block;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
}

.status-dot.active {
    background-color: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

/* Recordings section */
.recordings-section {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
}

.recordings-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

#recordings-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

#recordings-list li {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #334155;
}

#recordings-list a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

#recordings-list a:hover {
    text-decoration: underline;
}

.download-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
}
