:root {
    --bg-color: #271743; /* deep plum background */
    --text-color: #f4f4fb;
    --card-bg: rgba(255, 255, 255, 0.78);
    --primary: #C10BD2; /* bright magenta */
    --primary-dark: #7313FD; /* deep violet */
    --secondary: #27C843; /* vivid green */
    --secondary-soft: #6EC843; /* soft lime */
    --highlight: #78C8F7; /* sky blue */
    --accent: #E5C8F7; /* pastel pink */
    --border: rgba(39, 23, 67, 0.35);
    --radius: 14px;
    --gap: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-color);
    background: url('Background.png') center/cover no-repeat, linear-gradient(120deg, #5d6f8f, #2b2f4f);
    background-attachment: fixed;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    display: grid;
    place-items: center;
    padding: 20px;
}

.homepage {
    width: min(1200px, 100% - 20px);
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "header header"
        "sidebar main";
    gap: var(--gap);
    max-width: 1180px;
    min-height: 80vh;
}

.box {
    background: #271743;
    border: 1px solid var(--secondary);
    border-radius: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header {
    grid-area: header;
    text-align: center;
    padding: 1.5rem;
}

.sidebar {
    grid-area: sidebar;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.main {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar .card, .main .card {
    padding: 1rem;
    border-radius: 0;
    background: #271743;
    border: 1px solid rgba(39, 23, 67, 0.2);
}

.title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.4rem, 2vw + 0.4rem, 2.25rem);
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 1px 8px rgba(193, 11, 210, 0.45);
}

.subtitle {
    margin: 0;
    font-size: clamp(0.95rem, 1vw + 0.2rem, 1.2rem);
    color: var(--accent);
}

.content {
    font-size: clamp(0.95rem, 0.95vw + 0.1rem, 1.05rem);
    line-height: 1.5;
    color: #27C843;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #C10BAB;
    padding: 0.68rem 1.05rem;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid var(--highlight);
    max-width: fit-content;
    box-shadow: 0 10px 18px rgba(39, 20, 112, 0.35);
}

.btn:hover {
    color: #78C8F7;
    background: linear-gradient(135deg, #7313FD, #6EC843);
    transform: translateY(-1px);
    box-shadow: 0 14px 20px rgba(39, 20, 112, 0.45);
}

@media (max-width: 980px) {
    body {
        background-attachment: scroll;
    }

    .homepage {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "sidebar";
        gap: 14px;
        width: min(100%, 100% - 14px);
        min-height: auto;
    }

    .sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar .card {
        flex: 1 1 48%;
    }

    .main {
        order: 2;
    }
}

@media (max-width: 570px) {
    .homepage {
        padding: 10px;
    }

    .sidebar .card {
        flex: 1 1 100%;
    }

    .title { font-size: clamp(1.3rem, 5vw, 1.7rem); }
    .subtitle { font-size: clamp(0.92rem, 2.8vw, 1.08rem); }
}