/* ============================================
   CYBERPLATE v3.3 DESIGN TOKENS
   ============================================ */
:root {
    /* CP v3.3 Core Colors */
    --cp-primary: #0101F5;
    --cp-silver: #C0C0C0;
    --cp-bg-top: #000000;
    --cp-bg-bottom: #001f3f;
    
    /* CP v3.3 Text */
    --cp-text: #F5F7FF;
    --cp-text-muted: #a0a0a0;
    
    /* CP v3.3 Panels & Borders */
    --cp-panel: rgba(0, 31, 63, 0.65);
    --cp-border: rgba(255, 255, 255, 0.08);
    --cp-border-subtle: #1a3a5c;
    
    /* Typography */
    --cp-font: 'JetBrains Mono', monospace;
    
    /* Legacy aliases for compatibility */
    --accent-blue: var(--cp-primary);
    --gold: var(--cp-silver);
    --gold-text: #000000;
    --text-white: var(--cp-text);
    --font-mono: var(--cp-font);
    --silver-text: var(--cp-text);
    --silver-dim: var(--cp-text-muted);
    --border-glass: var(--cp-border);
    --panel-bg: var(--cp-panel);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(to bottom, var(--cp-bg-top), var(--cp-bg-bottom));
    color: var(--cp-text);
    font-family: var(--cp-font);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    background: var(--cp-panel);
    border: 1px solid var(--cp-border);
    padding: 25px;
    border-radius: 4px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* Shield Glimmer Effect */
.container.glimmer-active::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        120deg,
        transparent,
        transparent 40%,
        rgba(224, 224, 224, 0.1) 45%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(224, 224, 224, 0.1) 55%,
        transparent 60%,
        transparent
    );
    animation: shieldGlimmer 0.8s ease-out;
    pointer-events: none;
    z-index: 9999;
}

@keyframes shieldGlimmer {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }
    100% {
        transform: translateX(50%) translateY(50%);
    }
}

/* Error Modal Styling */
.modal-title.error {
    color: #D22F2F;
    border-bottom: 1px solid #D22F2F;
    padding-bottom: 10px;
}

.error-content {
    color: var(--cp-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: left;
    white-space: pre-wrap;
}

.error-card {
    border-color: #D22F2F;
    box-shadow: 0 0 30px rgba(210, 47, 47, 0.2);
}

/* Info Modal Styling (Easter Egg) */
.info-card {
    border-color: var(--cp-primary);
    box-shadow: 0 10px 30px rgba(1, 1, 245, 0.3);
    width: 500px;
    max-width: 90%;
    text-align: left;
}

.info-content {
    color: var(--cp-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.info-tagline {
    color: var(--cp-silver);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

.info-explanation {
    margin-bottom: 15px;
}

.info-note {
    padding: 16px 20px;
    background: rgba(1, 1, 245, 0.1);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 8px;
}

header {
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--cp-silver);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.logo a {
    text-decoration: none;
    color: var(--cp-silver);
    transition: color 0.2s ease;
}

.logo a:hover {
    color: var(--cp-text);
}

.app-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.app-subline {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--silver-dim);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.accent {
    color: var(--cp-silver);
    font-weight: bold;
}

.accent.clickable {
    cursor: pointer;
}

.status {
    background: transparent;
    color: var(--cp-text);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-br {
    display: none;
}

.blink {
    animation: blinker 2s linear infinite;
    color: var(--cp-text);
}

@keyframes blinker {
    50% { opacity: 0.5; }
}

/* Workflow Select */
.workflow-select {
    margin-bottom: 30px;
    border: 1px solid var(--cp-border-subtle);
    padding: 20px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 4px;
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.workflow-select label {
    margin-bottom: 0; /* Remove bottom margin as header handles it */
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--cp-border-subtle);
    color: var(--cp-text-muted);
    font-family: var(--cp-font);
    font-size: 0.7rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    border-radius: 2px;
}

.reset-btn:hover {
    border-color: #D22F2F;
    color: #D22F2F;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--cp-text);
    border: 1px solid var(--cp-border-subtle);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    font-family: var(--cp-font);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F5F7FF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--cp-primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(1, 1, 245, 0.25);
}

select option {
    background-color: var(--cp-bg-bottom);
    color: var(--cp-text);
    padding: 8px;
}

.custom-input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--cp-text);
    border: 1px solid var(--cp-primary);
    padding: 0.75rem 1rem;
    font-family: var(--cp-font);
    font-size: 0.9rem;
    display: block;
    animation: slideDown 0.3s ease;
    margin-top: 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.custom-input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 0.2rem rgba(1, 1, 245, 0.25);
}

.custom-input::placeholder {
    color: var(--cp-text-muted);
}

.custom-input.hidden {
    display: none;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hint-text {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--cp-text-muted);
    padding-left: 12px;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 0;
    gap: 5px;
    overflow: visible; /* Fix: Allow tooltips to overflow the tab container */
}

.tab-btn {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-bottom: none;
    padding: 15px;
    color: var(--text-white);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
    overflow: visible; /* Fix: Allow tooltips to overflow the button */
    display: flex; /* Flex to align text and icon */
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 1; /* Default z-index */
}

.tab-btn:hover {
    z-index: 10; /* Bring hovered tab to front so tooltip shows on top */
}


.tab-btn.active {
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0));
    color: var(--cp-text);
    border-color: var(--cp-silver);
    border-bottom: none;
    box-shadow: 0 -5px 15px rgba(192, 192, 192, 0.2);
}

.tab-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

/* Inline Help for Tabs */
.inline-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Anchor for tooltip */
}

.inline-help .icon {
    width: 18px;
    height: 18px;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
}

.inline-help:hover .icon {
    background: var(--cp-primary);
    border-color: var(--cp-primary);
}

.inline-help .tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    height: auto;
    min-height: fit-content;
    background: var(--cp-panel);
    border: 1px solid var(--cp-primary);
    padding: 12px;
    color: var(--cp-text);
    z-index: 9999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.9);
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: left;
    font-weight: normal;
    margin-top: 10px;
    white-space: normal;
    border-radius: 4px;
}

.inline-help:hover .tooltip {
    display: block;
}

/* Panels */
.panel {
    display: none;
    border: 1px solid var(--cp-border-subtle);
    border-top: 2px solid var(--cp-silver);
    padding: 25px;
    background: rgba(0, 0, 0, 0.35);
    margin-bottom: 20px;
    position: relative;
    border-radius: 0 0 4px 4px;
}

.panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Sliders */
.slider-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-glass);
}

.slider-group.critical label {
    color: var(--cp-silver);
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-header label {
    color: var(--cp-text);
    font-weight: 700;
}

.weight-badge {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    color: var(--cp-text-muted);
    border: 1px solid var(--cp-border);
    border-radius: 2px;
}

.question {
    font-size: 0.95rem;
    margin-bottom: 18px;
    line-height: 1.5;
    min-height: 2.8em;
    color: var(--cp-text);
}

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.7rem;
    color: var(--cp-text-muted);
}

input[type=range] {
    flex: 1;
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--cp-primary);
    border: 2px solid var(--cp-text);
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(1, 1, 245, 0.5);
}

/* Results */
.result-box {
    margin-top: 40px;
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border: 1px solid var(--border-glass);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cp-silver), transparent);
}

.score-label {
    font-size: 0.8rem;
    color: var(--cp-text-muted);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--cp-silver);
    margin-bottom: 15px;
    font-family: var(--cp-font);
}

.score-diagnosis {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--cp-text);
    min-height: 1.2em;
}

/* Anchor Card Form */
.card-anchor {
    padding: 0;
    background: transparent;
}

.card-anchor h3 {
    margin-bottom: 25px;
    font-size: 1.2rem;
    color: var(--cp-silver);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--cp-text);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cp-border-subtle);
    color: var(--cp-text);
    padding: 12px;
    font-family: var(--cp-font);
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 4px;
}

.form-group input[type="date"] {
    color-scheme: dark;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--cp-primary);
}

.tiny-text {
    font-size: 0.75rem;
    color: var(--cp-text-muted);
    margin-top: 8px;
    padding-left: 12px;
}

/* Buttons - CP v3.3 Primary Style */
.action-btn {
    width: 100%;
    padding: 18px;
    background: var(--cp-silver);
    color: #000000;
    border: none;
    font-family: var(--cp-font);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    z-index: 1;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ffffff;
    transition: left 0.25s ease-in-out;
    z-index: -1;
}

.action-btn:hover::before {
    left: 0;
}

.action-btn:hover {
    box-shadow: 0 5px 20px rgba(192, 192, 192, 0.4);
    color: #000000 !important;
}

.action-btn:active {
    transform: scale(0.98);
}

.record-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cp-font);
    font-size: 0.8rem;
    transition: all 0.3s;
    border-radius: 4px;
}

.record-btn:hover {
    border-color: var(--cp-primary);
    background: rgba(1, 1, 245, 0.1);
}

.record-btn .dot {
    width: 8px;
    height: 8px;
    background: #D22F2F;
    border-radius: 50%;
    box-shadow: 0 0 5px #D22F2F;
}

.record-btn.recording {
    border-color: #D22F2F;
    background: rgba(210, 47, 47, 0.1);
}

.record-btn.recording .dot {
    animation: blinker 1s infinite;
}

/* Custom Calendar */
.date-picker-wrapper {
    position: relative;
}

.date-picker-wrapper input {
    cursor: pointer;
}

.calendar-popup {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    background: var(--cp-panel);
    border: 1px solid var(--cp-silver);
    padding: 15px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    margin-bottom: 5px;
    border-radius: 4px;
}

.calendar-popup.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: var(--cp-silver);
    font-weight: 700;
}

.header-right {
    display: flex;
    gap: 5px;
    align-items: center;
}

.calendar-header button {
    background: transparent;
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    padding: 5px 10px;
    cursor: pointer;
    font-family: var(--cp-font);
    border-radius: 2px;
}

.calendar-header button:hover,
.today-btn-small:hover {
    border-color: var(--cp-silver);
    color: var(--cp-silver);
}

.today-btn-small {
    font-size: 0.65rem;
    padding: 6px 8px !important;
    background: transparent;
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    cursor: pointer;
    font-family: var(--cp-font);
    border-radius: 2px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(6, 1fr); /* Force 6 rows always */
    gap: 5px;
    text-align: center;
    height: 240px; /* Fixed height container */
}

.calendar-day {
    padding: 8px 0;
    font-size: 0.8rem;
    color: var(--cp-text-muted);
    cursor: pointer;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover {
    background: rgba(192, 192, 192, 0.1);
    color: var(--cp-text);
    border-color: var(--cp-silver);
}

.calendar-day.today {
    border: 1px solid var(--cp-text);
    color: var(--cp-text);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
}

.calendar-day.selected {
    background: var(--cp-silver);
    color: #000000;
    font-weight: bold;
}

.calendar-day.empty {
    pointer-events: none;
}

/* Evidence Manager */
.evidence-manager {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    padding: 15px;
    border-radius: 4px;
}

.evidence-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding-right: 50px; /* Reserve space for absolute trash icon */
    margin-bottom: 15px;
}

.trash-wrapper {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 20;
}

/* Cyberplate Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--cp-panel);
    border: 1px solid var(--cp-silver);
    padding: 30px;
    width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.modal-title {
    color: var(--cp-silver);
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-description {
    color: var(--cp-text);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    border: 1px solid var(--cp-border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--cp-text);
    cursor: pointer;
    font-family: var(--cp-font);
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cp-text);
}

.modal-btn.confirm {
    background: var(--cp-silver);
    border-color: var(--cp-silver);
    color: #000000;
}

.modal-btn.confirm:hover {
    background: #ffffff;
    border-color: #ffffff;
}

/* Trash Toggle */
.trash-toggle {
    display: block !important;
    background: transparent;
    border: none;
    color: var(--cp-text);
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
    opacity: 0.7;
    transition: opacity 0.2s;
    width: 30px;
    height: 30px;
    min-width: 30px;
    text-align: center;
    z-index: 10;
}

.trash-toggle.hidden {
    display: none !important;
}

.trash-toggle:hover {
    opacity: 1;
}

.trash-toggle span {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #D22F2F;
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
}

.trash-popup {
    display: none;
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 280px;
    background: var(--cp-panel);
    border: 1px solid var(--cp-silver);
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
    z-index: 100;
    padding: 15px;
    border-radius: 4px;
}

.trash-popup.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.trash-close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--cp-text-muted);
    cursor: pointer;
    font-size: 1rem;
}

.trash-close-btn:hover {
    color: #D22F2F;
}

.trash-popup h4 {
    margin-top: 5px;
    color: var(--cp-text);
    font-size: 0.8rem;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--cp-border);
    padding-bottom: 5px;
}

.trash-list {
    list-style: none;
    max-height: 150px;
    overflow-y: auto;
}

.trash-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--cp-border);
    font-size: 0.75rem;
    color: var(--cp-text-muted);
}

.restore-btn {
    background: transparent;
    border: 1px solid var(--cp-primary);
    color: var(--cp-text);
    font-size: 0.65rem;
    padding: 2px 6px;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 2px;
}

.restore-btn:hover {
    background: var(--cp-primary);
    color: #ffffff;
}

.audio-status {
    font-size: 0.8rem;
    color: var(--cp-text-muted);
}

.evidence-list {
    list-style: none;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.evidence-list li {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cp-border);
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--cp-text);
    border-radius: 4px;
}

.evidence-list li.empty-state {
    background: transparent;
    border: 1px dashed var(--cp-border);
    color: var(--cp-text-muted);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.clip-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clip-actions {
    display: flex;
    gap: 10px;
}

.mini-btn {
    background: transparent;
    border: 1px solid var(--cp-border);
    color: var(--cp-text);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.7rem;
    font-family: var(--cp-font);
    text-transform: uppercase;
    transition: all 0.2s;
    border-radius: 2px;
}

.mini-btn:hover {
    border-color: var(--cp-silver);
    color: var(--cp-silver);
}

.mini-btn.play-btn {
    border-color: var(--cp-text);
    color: var(--cp-text);
}

.mini-btn.play-btn:hover {
    border-color: var(--cp-primary);
    color: var(--cp-text);
    box-shadow: 0 0 5px rgba(1, 1, 245, 0.3);
}

.download-zip {
    background: rgba(1, 1, 245, 0.1);
    border: 1px solid var(--cp-primary);
    color: var(--cp-text);
    font-size: 0.8rem;
    padding: 10px;
    font-family: var(--cp-font);
    font-weight: 700;
    margin-top: 15px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.download-zip:hover {
    background: var(--cp-primary);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(1, 1, 245, 0.3);
}

/* Enrichment Modal Styling */
.enrichment-card {
    border-color: var(--cp-primary);
    box-shadow: 0 10px 30px rgba(1, 1, 245, 0.3);
}

.context-form-card {
    width: 500px;
    max-width: 90%;
    text-align: left;
    max-height: 90vh;
    overflow-y: auto;
}

.context-form {
    margin-bottom: 20px;
}

.context-form .form-group {
    margin-bottom: 20px;
}

.context-form .form-group label {
    display: block;
    font-size: 0.75rem;
    color: var(--cp-text);
    margin-bottom: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.context-form textarea,
.context-form select {
    width: 100%;
    border: 1px solid var(--cp-border-subtle);
    color: var(--cp-text);
    padding: 10px;
    font-family: var(--cp-font);
    font-size: 0.85rem;
    transition: all 0.3s;
    border-radius: 4px;
}

.context-form textarea {
    background: rgba(0, 0, 0, 0.4);
    min-height: 120px;
}

.context-form select {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23F5F7FF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.context-form textarea:focus,
.context-form select:focus {
    outline: none;
    border-color: var(--cp-primary);
    box-shadow: 0 0 0 0.2rem rgba(1, 1, 245, 0.25);
}

.context-form select:focus {
    background-color: rgba(255, 255, 255, 0.15);
}

.context-form select option {
    background-color: var(--cp-bg-bottom);
    color: var(--cp-text);
}

.context-form select {
    cursor: pointer;
}

/* Extended Context Section in Make Tab */
.extended-context-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(1, 1, 245, 0.05);
    border: 1px solid var(--cp-text);
    border-radius: 4px;
}

.context-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
}

.context-toggle-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--cp-primary);
}

.context-toggle-wrapper label {
    font-size: 0.8rem;
    color: var(--cp-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin: 0;
}

.enriched-badge {
    background: var(--cp-primary);
    color: #ffffff;
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-left: auto;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.extended-fields {
    display: block;
    animation: slideDown 0.3s ease;
}

.extended-fields.hidden {
    display: none;
}

/* Result Modal Styling */
.result-card {
    width: 550px;
    text-align: left;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--cp-silver);
    padding-bottom: 10px;
}

.result-header .modal-title {
    margin-bottom: 0;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--cp-text);
    color: var(--cp-text);
    padding: 5px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-family: var(--cp-font);
    transition: all 0.2s;
    border-radius: 4px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--cp-silver);
}

.result-content {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--cp-border);
    padding: 15px;
    margin-bottom: 20px;
    font-family: var(--cp-font);
    font-size: 0.85rem;
    color: var(--cp-text);
    white-space: pre-wrap;
    line-height: 1.5;
    border-radius: 4px;
}

/* Audio Player */
.clip-player {
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-glass);
    padding: 8px;
    display: none;
    animation: slideDown 0.2s ease;
}

.clip-player.show {
    display: block;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.mini-control-btn {
    background: transparent;
    border: none;
    color: var(--cp-text);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-control-btn:hover {
    color: var(--cp-primary);
}

.close-player {
    color: #D22F2F;
    font-size: 0.8rem;
    margin-left: auto;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #333;
    cursor: pointer;
    position: relative;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: var(--cp-primary);
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.65rem;
    color: var(--cp-text-muted);
    margin-top: 4px;
    text-align: right;
    font-family: var(--cp-font);
}


.hidden {
    display: none;
}
footer {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--cp-text-muted);
    position: relative;
    border-top: 1px solid var(--cp-border);
    padding-top: 20px;
}

.footer-question {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cp-text);
    font-weight: 500;
}

/* Footer tooltip opens upward to stay visible */
.footer-question .inline-help .tooltip {
    bottom: 100%;
    top: auto;
    margin-top: 0;
    margin-bottom: 10px;
}

.copyright {
    text-align: right;
}

.bug-report {
    display: block;
    margin-top: 5px;
    color: var(--cp-text-muted);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.2s;
}

.bug-report:hover {
    opacity: 1;
    color: var(--cp-silver);
    text-decoration: underline;
}

.critique-trigger {
    cursor: help;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cp-text);
    font-weight: 500;
}

.critique-trigger .icon {
    background: rgba(1, 1, 245, 0.2);
    color: var(--cp-text);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid var(--cp-text);
}

.tooltip {
    display: none;
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 280px;
    background: var(--cp-panel);
    border: 1px solid var(--cp-primary);
    padding: 15px;
    color: var(--cp-text);
    z-index: 10;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
    font-size: 0.75rem;
    border-radius: 4px;
}

.critique-trigger:hover .tooltip {
    display: block;
}

/* Responsive: Keep content at top on very tall screens to avoid overflow */
@media (min-height: 2000px) {
    body {
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .container {
        margin-top: 40px;
    }
}

/* Mobile: Smaller heading to fit better on narrow screens */
@media (max-width: 768px) {
    .card-anchor h3 {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
        line-height: 1.4;
    }
    
    .app-title {
        font-size: 1rem;
    }
    
    .mobile-br {
        display: inline;
    }
    
    .status {
        text-align: right;
        line-height: 1.3;
    }
    
    /* Footer question mark closer to text */
    .footer-question {
        gap: 4px;
        max-width: 140px;
    }
    
    /* Center tooltip on mobile using fixed positioning */
    .footer-question .inline-help .tooltip {
        position: fixed;
        max-width: 90vw;
        width: 280px;
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        top: auto;
    }
    
    /* Position it above the footer */
    .footer-question:hover .inline-help .tooltip,
    .footer-question .inline-help:hover .tooltip {
        bottom: 80px;
    }
    
    /* Increase height of extended context fields significantly on mobile */
    #business-context,
    #modal-business-context {
        min-height: 140px; /* ~6 rows for comfortable typing */
    }
    
    #objectives,
    #modal-objectives {
        min-height: 140px; /* ~6 rows for comfortable typing */
    }
    
    #review-cadence,
    #modal-review-cadence {
        min-height: 100px; /* ~4 rows for comfortable typing */
    }
}

