:root {
    --bg: #0f172a;
    --card: #ffffff;
    --muted: #6b7280;
    --accent: #2563eb;
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #fca311;
    color: white;
}

header a {
    text-decoration: none;
}

header .logo {
    max-width: 40px;
    height: auto;
    display: block;
}

nav {
    text-align: center;
}

nav ul {
    list-style: none;
    display: inline-flex;
    gap: 30px;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.account-link #account {
    max-width: 24px;
    height: auto;
    display: block;
}

main {
    display: flex;
    padding: 20px;
    gap: 20px;
    flex-grow: 1;
}

.carousel {
    flex: 2;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.33s ease;
}

.carousel-track img {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: cover;
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #fff;
}

.article {
    flex: 1;
    aspect-ratio: 1;
    background-color: #e5e5e5;
    padding: 20px;
    border-radius: 8px;
    overflow-y: hidden;
}

.article:hover {
    overflow-y: auto;
}

.article h2 {
    margin-bottom: 15px;
}

.article p {
    font-size: 16px;
    line-height: 1.5;
}

footer {
    text-align: center;
    padding: 10px 0;
    background-color: #fca311;
    color: white;
}

#accountOverlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
}

#accountOverlay.show {
    display: block;
}

#accountPanel {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: #fff;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0);
    padding: 30px;
    transition: right 0.4s ease;
    z-index: 999;
}

#accountPanel.open {
    right: 0;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.3);
}

#dashboardPanel {
    position: fixed;
    top: 0;
    right: -150px;
    width: 150px;
    height: 100vh;
    background: #fff;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0);
    padding: 10px;
    transition: right 0.4s ease;
    z-index: 999;
}

#dashboardPanel.open {
    right: 0;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.3);
}

#dashboardPanel .option {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    padding: 10px;
    margin: 20px 0;
}

#dashboardPanel .option div {
    width: 100%;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    color: black;
    border-radius: 8px;
}

#dashboardPanel .option div:hover {
    background: var(--accent);
    color: white;
}

.switcher {
    display: flex;
    gap: 8px;
    background: #e5e5e5;
    padding: 6px;
    margin: 10px 0;
    border-radius: 999px;
}

.switcher button {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
}

.switcher button.active {
    background: var(--accent);
    color: white;
}

.form-panels {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.form-panel {
    position: absolute;
    inset: 0;
    padding: 18px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .28s cubic-bezier(.2, .9, .3, 1), opacity .18s ease;
}

.form-panel.active {
    transform: translateX(0);
    opacity: 1;
}

.form-panel input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-panel button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.message {
    position: relative;
    color: red;
    font-size: 12px;
}

.message.login {
    top: -130px;
}

.message.register {
    top: 0;
}

.closePanel {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        flex-direction: column;
        gap: 15px;
    }

    main {
        flex-direction: column;
    }

    main .carousel,
    main .article {
        flex: none;
        width: 100%;
    }
}