/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    background-color: #BFBEBE;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

/* Header */
div.header {
    width: 90%;
    margin-bottom: 3px;
    margin-left: 5%;
    margin-right: 5%;
    border-width: 2px;
    border-color: #212738;
    border-style: solid;
    background-image: linear-gradient(#69941F, #8EB23D);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

div.memverse_logo {
    margin-top: 3px;
    margin-bottom: 3px;
}

div.memverse_logo img {
    height: 60px;
}

div.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Navigation */
nav.main-nav {
    display: flex;
    gap: 15px;
    margin-right: 20px;
}

nav.main-nav a {
    color: white;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

nav.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

nav.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.3);
}

.msg-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e53e3e;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Footer */
div.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #008c19;
    color: white;
    text-align: center;
    padding: 10px 0;
}

div.footer a {
    color: #ffeb3b;
}

/* Buttons */
.buttons {
    -moz-box-shadow: inset 0px 1px 0px 0px #fce2c1;
    -webkit-box-shadow: inset 0px 1px 0px 0px #fce2c1;
    box-shadow: inset 0px 1px 0px 0px #fce2c1;
    background: linear-gradient(to bottom, #ffc477 5%, #fb9e25 100%);
    background-color: #ffc477;
    border-radius: 20px;
    border: 1px solid #eeb44f;
    display: inline-block;
    color: #ffffff;
    font-family: Arial Black, sans-serif;
    font-size: 15px;
    font-weight: bold;
    height: 40px;
    line-height: 40px;
    padding: 0 20px;
    text-decoration: none;
    text-align: center;
    text-shadow: 1px 1px 0px #cc9f52;
    cursor: pointer;
}

.buttons:hover {
    background: linear-gradient(to bottom, #fb9e25 5%, #ffc477 100%);
}

.buttons.small {
    height: 30px;
    line-height: 30px;
    font-size: 12px;
    padding: 0 15px;
}

.buttons.green {
    background: linear-gradient(to bottom, #44c767 5%, #18ab29 100%);
    border-color: #18ab29;
    text-shadow: 1px 1px 0px #2f6627;
}

.buttons.green:hover {
    background: linear-gradient(to bottom, #18ab29 5%, #44c767 100%);
}

.buttons.red {
    background: linear-gradient(to bottom, #fe6363 5%, #e41b1b 100%);
    border-color: #e41b1b;
    text-shadow: 1px 1px 0px #8f1414;
}

.buttons.red:hover {
    background: linear-gradient(to bottom, #e41b1b 5%, #fe6363 100%);
}

/* Hiring Button */
.hiring {
    background-color: #44c767;
    border-radius: 28px;
    border: 1px solid #18ab29;
    display: inline-block;
    cursor: pointer;
    color: #ffffff;
    font-family: Trebuchet MS, sans-serif;
    font-size: 17px;
    font-weight: bold;
    padding: 13px 10px;
    text-decoration: none;
    text-shadow: 0px 1px 0px #2f6627;
    position: fixed;
    bottom: 75px;
    right: 25px;
    z-index: 100;
}

.hiring:hover {
    background-color: #5cbf2a;
}

/* Home Page Sections */
div.left {
    margin-left: 10%;
    margin-top: 10px;
    float: left;
    width: 25%;
    font-size: 1.5em;
    color: #1374A6;
}

div.center {
    float: left;
    margin-top: 30px;
    width: 25%;
    font-size: 2.5em;
    color: #13A66F;
}

div.right {
    float: right;
    margin-top: 50px;
    width: 40%;
    font-size: 3.5em;
    color: #1AA613;
}

div.info {
    text-align: center;
    margin-left: 10%;
    margin-right: 10%;
    margin-top: 250px;
    font-size: 1.5em;
}

/* Main Content */
.main-content {
    width: 90%;
    margin: 20px auto;
    padding-bottom: 80px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #69941F;
    padding-bottom: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #69941F;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Flash Messages */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: #69941F;
    color: white;
}

table tr:hover {
    background-color: #f5f5f5;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #69941F, #8EB23D);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2.5em;
    font-weight: bold;
}

.stat-card .stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Quiz Styles */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

/* On the quiz page the layout is overridden inline to a flex column */

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
}

.quiz-timer {
    font-size: 1.5em;
    font-weight: bold;
    color: #e41b1b;
}

.question-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 1.3em;
    margin-bottom: 25px;
    color: #333;
}

.options-list {
    list-style: none;
    padding: 0;
}

.option-item {
    margin-bottom: 10px;
}

.option-btn {
    width: 100%;
    padding: 15px 20px;
    text-align: left;
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
}

.option-btn:hover {
    background: #e9ecef;
    border-color: #69941F;
}

.option-btn.selected {
    background: #69941F;
    color: white;
    border-color: #69941F;
}

.option-btn.correct {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.option-btn.incorrect {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

/* Results */
.results-summary {
    text-align: center;
    padding: 40px;
}

.results-score {
    font-size: 4em;
    font-weight: bold;
    color: #69941F;
}

.results-percentage {
    font-size: 1.5em;
    color: #666;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.badge.pending {
    background: #ffc107;
    color: #333;
}

.badge.approved {
    background: #28a745;
    color: white;
}

.badge.rejected {
    background: #dc3545;
    color: white;
}

/* Leaderboard */
.leaderboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.leaderboard-tabs a {
    padding: 10px 20px;
    background: #ddd;
    border-radius: 5px;
    color: #333;
}

.leaderboard-tabs a.active {
    background: #69941F;
    color: white;
}

.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    background: #ddd;
}

.rank-badge.gold {
    background: #ffd700;
    color: #333;
}

.rank-badge.silver {
    background: #c0c0c0;
    color: #333;
}

.rank-badge.bronze {
    background: #cd7f32;
    color: white;
}

/* Admin */
.admin-actions {
    display: flex;
    gap: 10px;
}

.question-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Auth pages */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
}

.auth-container .card {
    padding: 30px;
}

.auth-container h1 {
    text-align: center;
    color: #69941F;
    margin-bottom: 30px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #69941F;
}

/* Responsive */
@media (max-width: 768px) {
    div.header {
        flex-direction: column;
        padding: 10px;
    }

    div.controls {
        flex-direction: column;
        width: 100%;
    }

    nav.main-nav {
        flex-wrap: wrap;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 10px;
    }

    div.left,
    div.center,
    div.right {
        float: none;
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    div.info {
        margin-top: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
