:root {
    --primary-color: #1a5a96;
    --secondary-color: #005ea2;
    --accent-color: #ff8c42;
    --background-color: #f2f7ff;
    --border-color: #d0e0ff;
    --success-color: #00a91c;
    --warning-color: #ffbe2e;
    --error-color: #d83933;
    --card-shadow: 0 8px 20px rgba(0, 41, 103, 0.15);
    --header-font: 'Montserrat', sans-serif;
    --body-font: 'Source Sans Pro', sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500;700&family=Source+Sans+Pro:wght@400;600&display=swap');

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: #1b1b1b;
    background: var(--background-color);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232f60a5' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Image Banner */
.image-banner {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner-content {
    display: flex;
    height: 100%;
    animation: scroll 40s linear infinite;
    width: fit-content;
}

.banner-content img {
    height: 100%;
    width: auto;
    object-fit: cover;
    margin-right: 10px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.container {
    max-width: 850px;
    margin: -50px auto 50px;
    background-color: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

header {
    margin-bottom: 35px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    position: relative;
}

h1 {
    color: var(--primary-color);
    margin-top: 0;
    font-family: var(--header-font);
    font-weight: 700;
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

h1::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

textarea, input:not([type="range"]) {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: var(--body-font);
}

textarea:focus, input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 90, 150, 0.2);
}

textarea {
    min-height: 150px;
}

.form-group {
    margin-bottom: 25px;
}

.sass-meter {
    margin-bottom: 30px;
    background: rgba(26, 90, 150, 0.05);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.sass-meter input {
    width: calc(100% - 80px);
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 0;
    -webkit-appearance: none;
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}

.sass-meter input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: all 0.2s;
}

.sass-meter input::-webkit-slider-thumb:hover {
    background: #ff7730;
    transform: scale(1.2);
}

.sass-level {
    display: inline-block;
    width: 60px;
    text-align: center;
    font-weight: bold;
    margin-left: 15px;
    padding: 6px 10px;
    border-radius: 20px;
    color: white;
    background-color: var(--primary-color);
    transition: background-color 0.3s;
}

button {
    background: linear-gradient(135deg, var(--primary-color), #0e4377);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(26, 90, 150, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #1c68b0, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 90, 150, 0.4);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(26, 90, 150, 0.4);
}

button:disabled {
    background: #c9c9c9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button svg {
    margin-right: 8px;
}

.results {
    margin-top: 40px;
    padding: 25px;
    background-color: #f9fbff;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0, 41, 103, 0.1);
    position: relative;
    transition: all 0.3s;
}

.results h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-family: var(--header-font);
    font-size: 1.5rem;
}

.results ul {
    margin-top: 15px;
    padding-left: 25px;
}

.results li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 10px;
}

.results li::marker {
    color: var(--accent-color);
    font-size: 1.2em;
}

.message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
    padding-left: 45px;
}

.message::before {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.success {
    background-color: #e7f6e8;
    border-left: 4px solid var(--success-color);
}

.success::before {
    content: "✓";
    color: var(--success-color);
}

.warning {
    background-color: #fff5e6;
    border-left: 4px solid var(--warning-color);
}

.warning::before {
    content: "⚠";
    color: var(--warning-color);
}

.error {
    background-color: #f9e6e6;
    border-left: 4px solid var(--error-color);
}

.error::before {
    content: "✕";
    color: var(--error-color);
}

.hidden {
    display: none;
}

.time-remaining {
    font-style: italic;
    margin-top: 10px;
    color: #555;
    background: #f0f5ff;
    padding: 10px 15px;
    border-radius: 6px;
    display: inline-block;
}

.loader {
    margin: 30px auto;
    width: 40px;
    height: 40px;
    position: relative;
}

.loader:before {
    content: '';
    width: 40px;
    height: 5px;
    background: #000;
    opacity: 0.1;
    position: absolute;
    top: 49px;
    left: 0;
    border-radius: 50%;
    animation: shadow 0.5s linear infinite;
}

.loader:after {
    content: '';
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    animation: bounce 0.5s linear infinite;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 3px;
}

@keyframes bounce {
    17% {
        border-bottom-right-radius: 3px;
    }
    25% {
        transform: translateY(9px) rotate(22.5deg);
    }
    50% {
        transform: translateY(18px) scale(1, 0.9) rotate(45deg);
        border-bottom-right-radius: 40px;
    }
    75% {
        transform: translateY(9px) rotate(67.5deg);
    }
    100% {
        transform: translateY(0) rotate(90deg);
    }
}

@keyframes shadow {
    0%, 100% {
        transform: scale(1, 1);
    }
    50% {
        transform: scale(1.2, 1);
    }
}

.sass-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.footer {
    margin-top: 40px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: block;
}

.htmx-request.htmx-indicator {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .image-banner {
        height: 140px;
    }
    
    .container {
        margin: -30px 15px 50px;
        padding: 25px;
        border-radius: 12px;
    }
    
    button {
        width: 100%;
    }
}