body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: #F5F3F7;
    color: #2D1B36;
    min-height: 100vh;
}

/* üleval navbar */
.navbar {
    height: 80px;
    background: white;
    display: flex;
    align-items: center;
    padding: 0 70px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* kohendasin */
.nav-left,
.nav-center,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

/* joondus */
.nav-left {
    justify-content: flex-start;
}

.nav-center {
    justify-content: center;
}

.nav-right {
    justify-content: flex-end;
}

/* logo */
.logo {
    font-size: 26px;
}

/* lingid */
.nav-center a,
.nav-right a {
    text-decoration: none;
    color: #5A1E69;
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    transition: 0.2s ease;
}

.nav-center a:hover,
.nav-right a:hover {
    opacity: 0.7;
}

/* pealkiri ja muud asjad, kogu avalehe värk */
.landing-container {
    text-align: center;
    padding-top: 80px;
    padding-bottom: 100px;
}

.landing-container h1 {
    font-size: 72px;
    color: #5A1E69;
    margin-bottom: 120px;
    font-style: italic;
}

/* kaardid */
.cards-wrapper {
    display: flex;
    justify-content: center;
    gap: 140px;
    flex-wrap: wrap;
}

.role-card {
    width: 400px;
    min-height: 340px;
    background: #FFFFFF;
    border-radius: 30px;
    padding: 40px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.teacher-card {
    border: 5px solid #D9B8FF;
}

.student-card {
    border: 5px solid #7EE2A8;
}

/* emotikoni asjad */
.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 42px;
    margin-bottom: 20px;
}

.icon-circle.purple {
    border: 4px solid #d7b4ff;;
    background: #f0ddff;
}

.icon-circle.green {
    border: 4px solid #6fd79b;
    background: #dff8ea;
}

/* kaartide tekst */
.role-card h2 {
    margin: 0;
    font-size: 48px;
    font-weight: 800;
    font-style: italic;
}

.teacher-card h2 {
    color: #5A1E69;
}

.student-card h2 {
    color: #6FD69A;
}

.role-card p {
    margin-top: 20px;
    margin-bottom: 35px;
    font-size: 20px;
    font-weight: 600;
}

/* niiöelda nupud */
.card-button {
    text-decoration: none;
    padding: 16px 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: white;
    font-size: 22px;
    font-weight: 700;
    transition: 0.2s ease;
}

.card-button:hover {
    transform: translateY(-2px);
}

.purple-btn {
    background-color: #A855F7;
}

.green-btn {
    background-color: #74D99F;
}

/* et kui sisselogida vajutada */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.hidden {
    display: none;
}

/* modal kaart */
.login-modal {
    width: 420px;
    background: white;
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: pop 0.2s ease;
}

@keyframes pop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* UUED MODALID */

.modal-card {
    width: 500px;
    background: white;
    border-radius: 35px;
    padding: 40px;
    text-align: center;
    box-sizing: border-box;
}

.teacher-modal {
    border: 4px solid #A855F7;
}

.student-modal {
    border: 4px solid #74D99F;
}

.modal-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto 20px;
    font-size: 42px;
}

.modal-icon.purple {
    background: #E9D7FF;
}

.modal-icon.green {
    background: #D7F7E2;
}

.modal-card h2 {
    font-size: 54px;
    margin: 10px 0;
    font-style: italic;
    font-weight: 800;
}

.teacher-modal h2 {
    color: #5A1E69;
}

.green-title {
    color: #74D99F;
}

.modal-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
}

.modal-card form {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.modal-card label {
    font-weight: 700;
    margin-bottom: 8px;
    margin-top: 15px;
}

.modal-card input {
    padding: 16px;
    border-radius: 25px;
    border: 2px solid #E5E5E5;
    font-size: 16px;
    margin-bottom: 10px;
}

.modal-card select {
    width: 100%;
    height: 50px;
    margin-bottom: 20px;

    border: 2px solid #d7b4ff;
    border-radius: 18px;
    background: #f0ddff;

    padding: 0 16px;
    color: #4b164f;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
    outline: none;
}

.modal-card select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.teacher-btn,
.student-btn {
    border: none;
    border-radius: 18px;
    padding: 18px;
    margin-top: 20px;

    color: white;
    font-size: 30px;
    font-weight: 700;
    font-style: italic;

    cursor: pointer;
}

.teacher-btn {
    background: #A855F7;
}

.student-btn {
    background: #74D99F;
}

/* tagasi avalehele link */
.back-link {
    color: #a855f7;
    font-size: 16px;
    font-weight: 700;
    font-style: italic;
    text-decoration: none;
}

/* konto taotluse teade */
.done-link {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.forgot-link {
    display: block;
    margin-top: 20px;

    color: black;
    text-decoration: none;

    font-size: 18px;
    font-style: italic;
    font-weight: 700;
}

.game-help {
    margin-top: 20px;
    font-size: 16px;
}

/* veateated */
.notice {
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

.notice_success {
    color: rgb(74, 180, 74);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

/* HOW TO PLAY leht */
.guide-container {
    display: flex;
    justify-content: center;
    padding: 80px 20px;
}

.guide-box {
    width: 100%;
    max-width: 1100px;
    background: white;
    border: 3px solid #D9B8FF;
    border-radius: 35px;
    padding: 50px 40px;
    box-sizing: border-box;
}

.guide-box h1 {
    margin-top: 0;
    margin-bottom: 35px;
    font-size: 56px;
    font-weight: 500;
    color: #1D1D1D;
}

.guide-text {
    font-size: 24px;
    line-height: 1.6;
    color: #1D1D1D;
}

.guide-text p {
    margin-bottom: 35px;
}

/* Õpetaja dashboard */

.teacher-dashboard {
    min-height: calc(100vh - 80px);
    padding: 115px 160px 70px;
    background: #fbf8fd;
}

.teacher-header {
    height: 80px;
    background: white;
    padding: 0 170px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.teacher-logo {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #4b164f;
    font-size: 24px;
    font-weight: 700;
    font-style: italic;
}

.logout-btn {
    background: none;
    border: none;
    color: #4b164f;

    font-size: 18px;
    font-weight: 700;
    font-style: italic;

    cursor: pointer;
}

.logout-btn:hover {
    opacity: 0.8;
}

.welcome {
    max-width: 1050px;
    margin: 0 auto 50px;
    padding: 26px 40px;
    background: white;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.welcome h1 {
    font-size: 30px;
    color: #111;
    margin: 0 0 18px;
    font-style: italic;
    font-weight: 700;
}

.welcome p {
    margin: 0;
    color: #111;
    font-size: 16px;
}

.teacher-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.dashboard-card {
    width: 280px;
    min-height: 285px;
    background: white;
    padding: 30px 34px;
    border-radius: 18px;
    border: 2px solid #a855f7;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
    text-align: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-card h2 {
    color: #4b164f;
    margin-top: 18px;
    margin-bottom: 16px;
    font-size: 26px;
    font-style: italic;
    font-weight: 700;
}

.dashboard-card p {
    color: #333;
    margin-top: 0;
    margin-bottom: 38px;
    font-size: 16px;
}

.dashboard-card .card-button {
    width: 190px;
    height: 50px;
    padding: 0;

    border-radius: 999px;
    border: none;
    background: #a855f7;
    color: white;

    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    font-style: italic;
    text-decoration: none;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Mängu loomise vaade */

.create-game-page {
    min-height: calc(100vh - 80px);
    background: #fbf8fd;

    display: flex;
    justify-content: center;
    align-items: center;

    position: relative;
}

.create-game-card {
    width: 430px;
    min-height: 540px;
    background: white;
    border: 4px solid #a855f7;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);

    padding: 78px 65px 55px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    position: relative;
}

.create-game-card .icon-circle {
    width: 100px;
    height: 100px;
    font-size: 52px;
}

.create-game-card h1 {
    margin: 22px 0 22px;
    color: #4b164f;
    font-size: 36px;
    font-weight: 700;
    font-style: italic;
}

.create-game-card p {
    margin: 0 0 30px;
    color: #333;
    font-size: 16px;
}

.create-game-card form {
    width: 100%;
}

.create-game-card label {
    display: block;
    margin-bottom: 8px;
    color: #111;
    font-weight: 700;
    text-align: left;
}

.create-game-card select {
    width: 100%;
    height: 38px;
    margin-bottom: 18px;

    border: 2px solid #a855f7;
    border-radius: 8px;
    background: #dcc7ef;

    padding: 0 16px;
    color: #555;
    font-size: 15px;
    font-weight: 600;
}

/* Edukalt loodud mäng */

.success-title {
    color: #4b164f;
    font-size: 34px;
    font-weight: 700;
    font-style: italic;
    line-height: 1.2;
    margin: 24px 0;
}

.game-code-box {
    width: 320px;
    height: 74px;

    margin: 20px 0 25px;

    background: #5a9d72;
    border-radius: 22px;

    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 30px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 2px;
}

/* Kontode kinnitamine */

.approvals-page {
    background: #fbf8fd;
    min-height: calc(100vh - 80px);
    padding: 30px 100px;
}

.approvals-hero,
.approvals-card {
    margin: 0 auto;
    background: white;
    box-sizing: border-box;
}

.approvals-hero {
    border-radius: 24px;
    padding: 15px 60px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.approvals-card {
    border: 2px solid #a855f7;
    border-radius: 24px;
    padding: 20px 40px 40px;
}

.approval-table {
    width: 100%;
    border-collapse: collapse;
}

.approval-table th {
    background: #e6d8f5;
    padding: 15px;
    font-size: 24px;
}

.approval-table td {
    padding: 15px;
    font-size: 22px;
    border-top: 1px solid #d8b4fe;
}

.approval-table th,
.approval-table td {
    padding: 15px;
    text-align: center;
}

.approval-table th:first-child,
.approval-table td:first-child {
    text-align: left;
}

.approval-table th:first-child,
.approval-table td:first-child {
    text-align: left;
}

.approval-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.approve-btn {
    width: 140px;
    height: 42px;
    border: 1px solid #a855f7;
    border-radius: 10px;
    background: #b8dcc7;
    font-size: 18px;

    cursor: pointer;
}

.reject-btn {
    width: 140px;
    height: 42px;
    border: 1px solid #a855f7;
    border-radius: 10px;
    background: #ffd9d9;
    font-size: 18px;

    cursor: pointer;
}

.results-btn {
    display: inline-block;
    padding:9px 16px;
    border-radius: 10px;
    background: #a855f7;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;

    white-space: nowrap;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.results-table th,
.results-table td {
    padding: 15px;
    text-align: center;
    vertical-align: middle;
}

.results-table tbody tr {
    border-bottom: 1px solid #d8b4fe;
}

/* FEEDBACK */

.feedback-page {
    min-height: 100vh;
    background: #fbf8fd;
    padding: 60px 100px;
}

.feedback-card {
    max-width: 850px;
    margin: 0 auto;
    background: white;
    border: 2px solid #a855f7;
    border-radius: 24px;
    padding: 45px 60px;
    box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

.feedback-card h1 {
    margin: 0 0 35px;
    color: #4b164f;
    font-size: 42px;
    font-style: italic;
}

.feedback-question {
    margin-bottom: 35px;
}

.feedback-question h3 {
    color: #2d1b36;
    font-size: 20px;
    margin-bottom: 14px;
}

.feedback-option {
    display: block;
    margin: 8px 0;
    font-size: 18px;
}

.feedback-question textarea {
    width: 100%;
    height: 180px;
    margin-top: 12px;
    padding: 14px;
    border: 2px solid #d8b4fe;
    border-radius: 14px;
    font-size: 16px;
    resize: none;
    box-sizing: border-box;
}

.feedback-submit {
    width: 230px;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: #a855f7;
    color: white;
    font-size: 20px;
    font-weight: 700;
    font-style: italic;
    cursor: pointer;
}
