body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Press Start 2P", system-ui;
    color: white;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.row {
    display: flex;
    width: 100%;
    height: 100%;
    flex-wrap: wrap;
}

.clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.clock {
    font-size: 2rem;
    text-align: center;
    margin: 0;
    word-spacing: -10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.calendar-container {
    flex: 2;
    min-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.calendar {
    width: 100%;
    height: 100%;
    max-width: 800px;
    font-size: 1rem;
}

#calendar-view {
    width: 100%;
}

.calendar iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
}

.btn {
    padding: 10px 15px;
    margin: 10px 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: "Press Start 2P", system-ui;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #4285F4;
    color: white;
}

.btn-secondary {
    background-color: #EA4335;
    color: white;
}

.events-list {
    max-height: 80vh;
    overflow-y: auto;
    padding: 10px;
}

.event {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid #4285F4;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 0 4px 4px 0;
}

.event h3 {
    margin-top: 0;
    color: #fff;
}

.event p {
    margin-bottom: 0;
    color: #ddd;
    line-height: 30px;
}

/* BACKGROUND */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000;
}

#bg canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.calendar body {
    background-color: rgba(255, 0, 0, 0.4);
}

.privacy-link {
    position: fixed;
    bottom: 15px;
    right: 15px;
    z-index: 100;
}

.privacy-link a {
    color: #777;
    font-size: 0.8rem;
    text-decoration: none;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    transition: color 0.3s;
}

.privacy-link a:hover {
    color: #3498db;
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .clock {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .clock-container,
    .calendar-container {
        flex: 1;
        min-width: 100%;
        padding: 10px;
    }

    .clock {
        font-size: 1.8rem;
    }

    .auth-buttons {
        max-width: 180px;
    }

    .btn {
        padding: 8px 12px;
    }

    .calendar iframe {
        min-height: 400px;
    }

    .privacy-link {
        bottom: 10px;
        right: 10px;
    }

    .privacy-link a {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .clock {
        font-size: 1.5rem;
    }

    .auth-buttons {
        max-width: 160px;
    }

    .calendar iframe {
        min-height: 300px;
    }

    .container {
        padding: 10px;
    }
}

@media screen and (orientation: landscape) {
    .container {
        flex-direction: row;
        align-items: flex-start;
        gap: 20px;
    }

    .clock-container {
        position: sticky;
        top: 20px;
        width: 30%;
        min-width: 200px;
    }

    .clock {
        font-size: 1.8rem;
        white-space: nowrap;
    }

    .calendar-container {
        width: 70%;
        max-height: 80vh;
        overflow-y: auto;
    }

    .auth-buttons {
        flex-direction: row;
        justify-content: space-between;
    }

    .auth-buttons .btn {
        width: auto;
    }

    #calendar-view {
        padding-right: 10px;
    }

    .events-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
}