/* General Styling & Fonts */
:root {
    --primary-color: #2fa84f;
    --primary-light: #52c26e;
    --accent-color: #007bff;
    --accent-light: #6c757d;
    --card-bg: #ffffff;
    --footer-bg: #f3f7f1;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f7f9fc;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Header & Footer */
.main-header {
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-center-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo {
    height: 45px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-auth {
    margin-left: auto;
}

.header-btn {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.main-footer {
    background-color: var(--footer-bg);
    color: #555;
    text-align: center;
    padding: 15px 20px;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* Layout */
.main-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar-nav {
    width: 250px;
    background-color: var(--card-bg);
    padding: 20px;
    box-shadow: 2px 0 5px var(--shadow-color);
    position: sticky;
    top: 60px;
    align-self: flex-start;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #555;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background-color: #e6f3e9;
    color: var(--primary-color);
}

.sidebar-nav li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.content-wrapper {
    flex-grow: 1;
    padding: 2rem;
}

.module-section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}

/* Card Style */
.module-card, .session-manager-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.module-card .card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.module-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.card-title {
    font-size: 1.7rem;
    color: var(--primary-color);
}

.card-description {
    color: #666;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

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

.btn-secondary {
    background-color: var(--accent-light);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-accent {
    background-color: var(--accent-color);
    color: #fff;
}

.btn-accent:hover {
    background-color: #0056b3;
}

.btn-save { background-color: #28a745; color: #fff; }
.btn-load { background-color: #ffc107; color: #333; }
.btn-summary { background-color: #17a2b8; color: #fff; }
.btn-export { background-color: #dc3545; color: #fff; }

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
}

.question-display {
    background-color: #f0f8ff;
    border-left: 5px solid var(--accent-color);
    padding: 15px;
    border-radius: 5px;
    font-style: italic;
    margin-top: 10px;
}

/* Specific Modules Styling */
/* Module 1: Icebreaker Cards */
.icebreaker-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.icebreaker-card {
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icebreaker-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.session-notes {
    background-color: #f8f9fa;
    border: 1px dashed var(--border-color);
    padding: 15px;
    min-height: 100px;
    border-radius: 8px;
    font-style: italic;
    color: #666;
    outline: none;
    line-height: 1.8;
}

.contract-list {
    list-style-type: none;
    margin-bottom: 20px;
}

.contract-list li label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
}

.contract-list input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Module 3: Wheel of Life */
.chart-container {
    max-width: 600px;
    margin: 0 auto 20px;
}

.sliders-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-group label {
    flex: 1;
}

.slider-group input[type="range"] {
    flex: 2;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e0e0e0;
    border-radius: 5px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.slider-group .slider-value {
    width: 25px;
    text-align: right;
}

/* Module 3: Value Cards */
.value-cards-board {
    display: flex;
    gap: 20px;
    min-height: 300px;
}

.value-cards-container, .top-values-container {
    flex: 1;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 15px;
    min-height: 250px;
    background-color: #f8f9fa;
}

.value-cards-container {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
}

.value-card {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: grab;
    transition: transform 0.1s, box-shadow 0.1s;
    font-size: 0.9rem;
}

.value-card:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.top-values-container h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #e6f3e9;
    border: 1px solid var(--primary-color);
}

/* Module 3: Mindmap */
.mindmap-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.mindmap-tree {
    list-style: none;
    padding-left: 20px;
    position: relative;
}

.mindmap-tree li {
    padding-left: 25px;
    position: relative;
    margin-top: 5px;
}

.mindmap-tree li:before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Module 4: Decision Options */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.decision-option {
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    background-color: #fafafa;
    position: relative;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.option-header h4 {
    margin: 0;
}

.remove-option-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 1rem;
}

.decision-option-group {
    margin-bottom: 10px;
}

.options-comparison-container {
    margin-top: 20px;
    overflow-x: auto;
}

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

.comparison-table th, .comparison-table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background-color: #f1f1f1;
}

/* Module 5: Action Plan */
.action-plan-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.action-plan-table th, .action-plan-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.action-plan-table th {
    background-color: #f1f1f1;
}

.action-plan-table .delete-row-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
}

.commitment-slider-container {
    text-align: center;
    margin-top: 20px;
}

.commitment-slider {
    width: 80%;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    color: #fff;
    margin-top: 10px;
}

.badge.high-commitment {
    background-color: #28a745;
}

/* Module 6: Reflection Journal */
.reflection-entry {
    margin-bottom: 1.5rem;
}

.journal-text {
    min-height: 100px;
}

.insight-card-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

#insightCardCanvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Feedback Form */
.feedback-question {
    margin-bottom: 15px;
}

.likert-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.likert-scale input[type="radio"] {
    cursor: pointer;
    width: auto;
}

/* Summary Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.summary-container {
    line-height: 1.8;
}

.summary-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.summary-container h3 {
    color: var(--accent-color);
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.summary-container p {
    margin-bottom: 10px;
}

.summary-container ul {
    margin-left: 20px;
}

.summary-container .highlight {
    background-color: #e6f3e9;
    padding: 10px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}


/* Responsive Design */
@media (max-width: 768px) {
    .main-header {
        flex-wrap: wrap;
        height: auto;
        padding: 10px;
    }

    .header-center-content {
        position: static;
        transform: none;
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .header-logo-link {
        margin-right: 10px;
    }

    .header-auth {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .header-title {
        font-size: 1.2rem;
        margin: 0;
    }

    .main-container {
        flex-direction: column;
    }

    .sidebar-nav {
        width: 100%;
        position: static;
        box-shadow: none;
        border-bottom: 1px solid var(--border-color);
    }

    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-nav li {
        flex-shrink: 0;
    }

    .sidebar-nav li a {
        padding: 8px 12px;
    }

    .content-wrapper {
        padding: 1rem;
    }
}