/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Basier Circle", -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #2f2f2f;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
}

/* Main content layout */
.main-content {
    flex-grow: 1;
    padding: 48px 40px 24px 40px;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
}
.single-column {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.section-desc {
    font-size: 1rem;
    color: #444;
    margin-bottom: 24px;
}
.card-list { display: flex; flex-direction: column; gap: 20px; }
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.04);
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #ececec;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2f2f2f;
    margin-bottom: 2px;
}
.label {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    background: #ffe9b8;
    color: #b48a00;
    border-radius: 8px;
    padding: 2px 12px;
    margin-bottom: 8px;
}
.label.optional {
    background: #e6f7e6;
    color: #1a7f37;
}
.card-desc {
    font-size: 1rem;
    color: #444;
    margin-bottom: 8px;
}
.card-actions {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}
.btn-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #f78817;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}
.btn-link i { font-size: 20px; }
.btn-link:active, .btn-link:focus { color: #c96a0a; }
.btn-link[disabled], .btn-link.disabled { color: #ccc; cursor: not-allowed; }
/* Help section */
.help-section {
    margin-top: 40px;
    font-size: 1rem;
    color: #444;
    text-align: center;
}
.help-section b { color: #2f2f2f; }
.help-section a { color: #2f2f2f; font-weight: 700; text-decoration: none; }
/* New styles for completed state */
.card.completed .card-title::after {
    content: "✓";
    color: #1a7f37;
    margin-left: 8px;
    font-size: 1.2rem;
}
.card.completed .btn-link {
    color: #1a7f37;
}
.card.completed .btn-link i {
    color: #1a7f37;
}
/* New button styles */
.start-discovery-btn {
    position: absolute;
    top: 5px;
    right: 40px;
    background: #f78817;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}
.start-discovery-btn:hover {
    background: #e67a0f;
}
.start-discovery-btn i {
    font-size: 20px;
}
@media (max-width: 768px) {
    .single-column { padding: 0 16px; }
    .start-discovery-btn {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 24px;
    }
}

/* ============================================
   Popup Styles
   ============================================ */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: white;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    position: relative;
    overflow-y: auto;
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 24px;
}

.popup-close:hover {
    color: #2f2f2f;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2f2f2f;
}

.popup-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 24px;
}

.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* Form group */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2f2f2f;
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    color: #2f2f2f;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: #f78817;
}

/* Radio button group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item {
    display: block;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.radio-item:hover {
    border-color: #f78817;
    background: #fff9f0;
}

.radio-item.selected {
    border-color: #f78817;
    background: #fff9f0;
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #f78817;
    cursor: pointer;
    margin: 0;
    vertical-align: middle;
}

.radio-item-title {
    font-weight: 600;
    color: #2f2f2f;
    margin-left: 12px;
    vertical-align: middle;
}

.radio-item-description {
    display: block;
    padding-left: 32px;
    margin-top: 4px;
    font-size: 0.9rem;
    color: #666;
}

.radio-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button styles */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #2f2f2f;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-primary {
    background: #f78817;
    border: none;
    color: white;
}

.btn-primary:hover {
    background: #e67a0f;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .popup-content {
        padding: 24px;
        margin: 16px;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-actions .btn {
        width: 100%;
    }
}