:root {
    /* IGS Morbach CI Colors */
    --igs-green: #B1C700;
    --igs-orange: #F6A800;
    --igs-blue: #009DE0;
    --igs-red: #E1007A;

    /* Mapping to functional names */
    --primary-color: var(--igs-blue);
    --secondary-color: #f4f4f4;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #fff;
    /* Gradient border using CI colors */
    border-bottom: 5px solid;
    border-image: linear-gradient(to right, var(--igs-green), var(--igs-orange), var(--igs-blue), var(--igs-red)) 1;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--igs-blue);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    height: 60px;
}

.header-icon {
    height: 60px;
}

main {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.task-section,
.solution-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.solution-section {
    border-left: 5px solid var(--igs-green);
}

.task-image,
.solution-image {
    width: 400px;
    height: 400px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #ccc;
}

.task-content,
.solution-content {
    flex: 1;
    font-size: 1.8rem;
    /* Increased from 1.2rem for better visibility */
}

/* CSS Timer (No-JS) */
.timer-container {
    width: 100%;
    max-width: 1200px;
    height: 30px;
    background-color: #ddd;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--igs-blue);
}

.timer-bar {
    height: 100%;
    width: 100%;
    background-color: var(--igs-blue);
    /* Animation: 5 minutes = 300 seconds */
    animation: shrink 300s linear forwards;
    transform-origin: left;
    float: right;
    /* Make it shrink from left to right */
}

/* Change color as time runs out */
@keyframes shrink {
    0% {
        width: 100%;
        background-color: var(--igs-green);
    }

    50% {
        width: 50%;
        background-color: var(--igs-orange);
    }

    80% {
        width: 20%;
        background-color: var(--igs-red);
    }

    100% {
        width: 0%;
        background-color: var(--igs-red);
    }
}

.btn {
    background: var(--igs-blue);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn:hover {
    background: #007bb0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn.secondary {
    background: #666;
    margin-top: 10px;
}

.btn.next {
    background: var(--igs-blue);
    color: #fff;
    /* Ensure text is readable */
    margin-top: 10px;
}

.btn.next:hover {
    background: #007bb0;
    /* Darker IGS Blue */
}

/* Color Overrides */
.btn.green {
    background-color: var(--igs-green);
}

.btn.green:hover {
    background-color: #99ac00;
}

.btn.red {
    background-color: var(--igs-red);
}

.btn.red:hover {
    background-color: #c10068;
}

.btn.blue {
    background-color: var(--igs-blue);
}

.btn.blue:hover {
    background-color: #007bb0;
}

/* Layout Utilities */
.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.btn-stack .btn {
    margin: 0;
    width: fit-content;
}

.button-area {
    text-align: center;
}

/* Admin specifics */
th {
    background-color: var(--igs-blue);
    color: white;
}

.admin-card h3 {
    color: var(--igs-orange);
}

.admin-card:hover {
    border-color: var(--igs-blue);
}

footer {
    text-align: center;
    padding: 15px;
    background: #eee;
    font-size: 0.9rem;
}