:root {
    /* Desired Purple Theme */
    --bg-color: #8c7ae6;
    --bg-gradient: linear-gradient(135deg, #8c7ae6 0%, #9c88ff 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);

    --primary: #6c5ce7;
    --primary-hover: #5f27cd;
    --text-main: #2d3436;
    --text-light: #636e72;

    --btn-enthusiastic: #fdcb6e;
    --btn-rational: #74b9ff;
    --btn-sarcastic: #a29bfe;

    --radius-xl: 32px;
    --radius-lg: 16px;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    /* Fallback */
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.main-wrapper {
    width: 100%;
    max-width: 500px;
}

.card {
    background: var(--card-bg);
    border: var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: all 0.3s ease;
}

.title-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
    z-index: 1;
    /* Ensure text is on top */
}

.logo-title {
    font-weight: 900;
    font-size: 2.2rem;
    margin: 0;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
    /* Text sits above windmill */
}

/* Windmill Animation */
.windmill {
    position: absolute;
    top: -35px;
    right: -20px;
    width: 80px;
    height: 100px;
    z-index: -1;
    opacity: 0.9;
    transform: scale(0.8);
}

/* Runko / Body */
.windmill-post {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    /* Thinner post */
    height: 50px;
    background: #b2bec3;
    /* Greyish post */
    border-radius: 2px;
}

/* Pyörivät lavat / Moving Parts Container */
.windmill-blades {
    position: absolute;
    top: 30px;
    /* Center of blades */
    left: 50%;
    width: 0;
    height: 0;
    animation: spin 8s linear infinite;
    z-index: 1;
}

/* Center knob */
.windmill-center {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #ffeaa7;
    border: 2px solid #fff;
    border-radius: 50%;
    z-index: 2;
    /* On top of blades */
}

/* Individual Blade */
.blade {
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 45px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.4) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px);
    background-size: 4px 4px;
    /* Mesh size */
    background-color: rgba(255, 118, 117, 0.8);
    /* Base color */
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50% 50% 5px 5px;
    transform-origin: 50% 0;
    /* Rotate around top center */
    margin-left: -7px;
    /* Center horizontally */
}

/* Positioning blades */
.blade:nth-child(1) {
    transform: rotate(0deg);
}

.blade:nth-child(2) {
    transform: rotate(90deg);
}

.blade:nth-child(3) {
    transform: rotate(180deg);
}

.blade:nth-child(4) {
    transform: rotate(270deg);
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.subtitle {
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Style Selector */
.style-selector {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.style-selector label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
}

.style-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.style-btn {
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: #f1f2f6;
    color: var(--text-light);
    font-size: 0.9rem;
}

.style-btn:hover {
    transform: translateY(-2px);
}

.style-btn[data-style="enthusiastic"].selected {
    background: var(--btn-enthusiastic);
    color: #fff;
}

.style-btn[data-style="rational"].selected {
    background: var(--btn-rational);
    color: #fff;
}

.style-btn[data-style="sarcastic"].selected {
    background: var(--btn-sarcastic);
    color: #fff;
}

/* Energy Section */
.section-label {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.energy-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.energy-btn {
    background: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.energy-btn:hover {
    transform: scale(1.15) rotate(5deg);
    background-color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.helper-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    min-height: 1.5em;
    margin-top: 0.5rem;
}

/* Category Accordion Styles */
.category-group {
    margin-bottom: 1rem;
    border: 1px solid #dfe6e9;
    border-radius: var(--radius-lg);
    background: white;
    overflow: hidden;
}

.category-header {
    padding: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: var(--text-main);
    transition: background 0.2s;
}

.category-header:hover {
    background: #e9ecef;
}

.category-content {
    display: none;
    padding: 1rem;
    border-top: 1px solid #dfe6e9;
}

.category-content.open {
    display: block;
}

/* Plan View */
.plan-header {
    margin-bottom: 2rem;
}

.quote-container {
    background: #ffffff;
    /* Clean white */
    color: var(--text-main);
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.1);
    /* No border-left */
    text-align: left;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.quote-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.03) 0%, rgba(162, 155, 254, 0.05) 100%);
    pointer-events: none;
}

.quote-container h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    padding: 0;
    background: none;
    box-shadow: none;
    border: none;
    opacity: 1;
}

/* Coach Style Variants for Container */
.quote-container {
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: none;
    text-align: left;
    position: relative;
    overflow: hidden;
}

/* 1. Enthusiastic: Sunny & Bright ☀️ */
.quote-container.style-enthusiastic {
    background: linear-gradient(135deg, #fff59d 0%, #ffee58 100%);
    color: #ff5252;
    /* Pinkish-orange text instead of brown */
}

.quote-container.style-enthusiastic h3 {
    color: #ff5252;
    /* Pinkish-orange title */
}

/* 2. Rational: Smart Blue 🧠 */
.quote-container.style-rational {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    /* Light Blue */
    color: #0d47a1;
    /* Dark Blue text */
}

.quote-container.style-rational h3 {
    color: #1565c0;
    /* Stronger Blue for title */
}

/* 3. Sarcastic: Mystic Purple 😈 */
.quote-container.style-sarcastic {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    /* Light Purple */
    color: #4a148c;
    /* Deep Purple text */
}

.quote-container.style-sarcastic h3 {
    color: #7b1fa2;
    /* Strong Purple for title */
}

/* Sisu Override */
.quote-container.style-sisu {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    /* Light Red */
    color: #b71c1c;
}

.quote-container.style-sisu h3 {
    color: #c62828;
}

.quote-container p {
    margin: 0;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 600;
}

.task-list {
    list-style: none;
    padding: 0;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.task-item {
    background: white;
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    transition: all 0.2s;
    border: 1px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.task-item:hover {
    border-color: rgba(108, 92, 231, 0.2);
    transform: scale(0.98);
}

.task-item.selected {
    border-color: var(--primary);
    background-color: #f3f0ff;
}

.task-item.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-item input[type="checkbox"] {
    margin-right: 1rem;
    width: 1.3rem;
    height: 1.3rem;
    margin-top: 0.2rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.task-text {
    flex-grow: 1;
}

/* Visible but faded tasks */
.task-item.faded-task {
    opacity: 0.5;
    background-color: #f8f9fa;
    border: 1px dashed #dfe6e9;
}

.task-item.faded-task:hover {
    opacity: 0.9;
    border-color: var(--primary);
}

.task-item.faded-task .task-text {
    color: var(--text-light);
}

.status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #e17055;
    background: #fab1a0;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

.task-reason {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Actions */
.selection-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
    font-size: 0.9rem;
}

.secondary-btn:hover {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

/* Custom Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 700;
    color: var(--text-main);
    border: 2px solid var(--primary);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.5rem;
}

/* Custom Modal */
.modal {
    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: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 90%;
    width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.copy-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    margin-right: 1rem;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        transform: translateY(0);
    }
}

/* Home Navigation */
.home-navigation {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    /* Using white to stand out on the purple background */
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 15px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.home-navigation:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.home-navigation svg {
    width: 20px;
    height: 20px;
}

/* Mobile check */
@media (max-width: 600px) {
    .home-navigation span {
        display: none;
        /* Check text visibility logic */
        display: block;
    }

    .task-list {
        grid-template-columns: 1fr !important;
        /* Single column on mobile to prevent clipping */
    }
}