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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.navbar {
    background-color: #166534;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    height: 44px;
    width: 44px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid white;
}

.navbar-brand h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    font-size: 0.95rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.btn-logout {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #b91c1c;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
}

.footer {
    background-color: #f0f0f0;
    text-align: center;
    padding: 2rem 0;
    color: #666;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #166534;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(21, 101, 52, 0.15);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background-color: #166534;
    color: white;
}

.btn-primary:hover {
    background-color: #15803d;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #dc2626;
}

/* Dashboard */
.dashboard h2 {
    color: #166534;
    margin-bottom: 2rem;
}

.hour-section {
    margin-bottom: 2rem;
}

.hour-section h3 {
    color: #374151;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.video-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #166534, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.thumbnail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    font-size: 3rem;
    color: white;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.thumbnail-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}

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

.video-info {
    padding: 1rem;
}

.video-id {
    font-weight: 500;
    margin: 0;
}

.no-videos {
    text-align: center;
    padding: 2rem;
    color: #666;
}

/* Video Page */
.video-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-player {
    margin-top: 1rem;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.video-player iframe,
.video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    border: none;
    background: #000;
    object-fit: contain;
}

/* Sorteio de Times */
.sorteio h2 {
    color: #166534;
    margin-bottom: 1.5rem;
}

.sorteio-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sorteio-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: monospace;
    resize: vertical;
}

.sorteio-form textarea:focus {
    outline: none;
    border-color: #166534;
    box-shadow: 0 0 0 3px rgba(21, 101, 52, 0.15);
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.radio-option input {
    width: auto;
}

.sorteio-result {
    margin-top: 2rem;
}

.sorteio-result h3 {
    color: #374151;
    margin-bottom: 1rem;
}

.btn-whatsapp {
    display: inline-block;
    background-color: #25d366;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s;
}

.btn-whatsapp:hover {
    background-color: #1eb855;
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.team-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #22c55e;
}

.team-card h4 {
    color: #166534;
    margin-bottom: 0.75rem;
}

.team-count {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.9rem;
}

.team-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.team-list li {
    padding: 0.4rem 0.6rem;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .navbar-menu {
        width: 100%;
        justify-content: center;
    }

    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .container {
        margin: 1rem auto;
    }

    .login-box {
        margin: 1rem;
    }
}
