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

body {
    font-family: 'Poppins', sans-serif;
    background: #2a2725;
    color: #f0ebe3;
    overflow: hidden;
    height: 100vh;
}

/* Header */
.header {
    text-align: center;
    padding: 20px;
    background: rgba(240, 235, 227, 0.06);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(61, 97, 120, 0.25);
}

.header h1 {
    font-size: 2em;
    color: #6a9ab5;
    margin-bottom: 5px;
    font-weight: 700;
}

.header p {
    color: rgba(240, 235, 227, 0.7);
    font-size: 0.9em;
}

/* Main Layout Container */
.main-container {
    display: flex;
    height: calc(100vh - 100px);
    gap: 0;
}

/* Map Viewport (Left Side - 68%) */
.map-viewport {
    flex: 0 0 68%;
    position: relative;
    background: rgba(42, 39, 37, 0.3);
    border-right: 1px solid rgba(61, 97, 120, 0.25);
}

#threeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Legend Overlay (Top-Left of Map) */
.legend-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(240, 235, 227, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(61, 97, 120, 0.25);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10;
    max-width: 280px;
}

.legend-overlay h3 {
    color: #6a9ab5;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.8em;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Empty State Message */
.empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(106, 154, 181, 0.5);
    max-width: 400px;
    padding: 30px;
}

.empty-state h3 {
    color: #6a9ab5;
    font-size: 1.3em;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 0.95em;
    line-height: 1.6;
}

/* Controls Panel (Right Side - 32%) */
.controls-panel {
    flex: 0 0 32%;
    background: rgba(240, 235, 227, 0.04);
    backdrop-filter: blur(12px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

/* Custom Scrollbar */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: rgba(61, 97, 120, 0.4);
    border-radius: 10px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(106, 154, 181, 0.7);
}

/* Control Sections */
.control-section {
    background: rgba(240, 235, 227, 0.06);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(61, 97, 120, 0.25);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.control-section h3 {
    color: #6a9ab5;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Species Search Input */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(30, 28, 26, 0.6);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-radius: 8px;
    color: #f0ebe3;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6a9ab5;
    box-shadow: 0 0 10px rgba(61, 97, 120, 0.25);
}

.search-input::placeholder {
    color: rgba(240, 235, 227, 0.4);
}

/* Search Results Dropdown */
.search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(30, 28, 26, 0.95);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
    margin-top: -1px;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(61, 97, 120, 0.2);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(61, 97, 120, 0.2);
}

.search-result-name {
    color: #f0ebe3;
    font-weight: 500;
    font-size: 0.9em;
}

.search-result-scientific {
    color: rgba(240, 235, 227, 0.6);
    font-size: 0.75em;
    font-style: italic;
    margin-top: 2px;
}

/* Selected Species */
.selected-species {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    margin-bottom: 12px;
}

.selected-species.empty {
    justify-content: center;
    align-items: center;
}

.species-badge {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.25), rgba(61, 97, 120, 0.3));
    border: 1px solid rgba(61, 97, 120, 0.4);
    color: #f0ebe3;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.species-badge:hover {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.4), rgba(61, 97, 120, 0.5));
    transform: translateY(-2px);
}

.species-badge .remove {
    background: rgba(231, 76, 60, 0.3);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #e74c3c;
}

.empty-message {
    color: rgba(240, 235, 227, 0.5);
    font-size: 0.85em;
    font-style: italic;
    text-align: center;
}

.selection-limit {
    font-size: 0.75em;
    color: rgba(240, 235, 227, 0.6);
    text-align: center;
    margin-top: 8px;
}

/* Curated Sets */
.curated-sets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.curated-btn {
    padding: 10px 12px;
    background: rgba(30, 28, 26, 0.6);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-radius: 8px;
    color: rgba(240, 235, 227, 0.8);
    font-family: 'Poppins', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.curated-btn:hover {
    background: rgba(61, 97, 120, 0.2);
    border-color: #6a9ab5;
    transform: translateY(-2px);
}

/* Exploration Buttons */
.exploration-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.explore-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.25), rgba(61, 97, 120, 0.3));
    border: 1px solid rgba(61, 97, 120, 0.4);
    border-radius: 8px;
    color: #f0ebe3;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.explore-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.4), rgba(61, 97, 120, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(61, 97, 120, 0.25);
}

.explore-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.explore-btn.active {
    background: linear-gradient(135deg, rgba(111, 154, 76, 0.6), rgba(61, 97, 120, 0.6));
    border-color: #6a9ab5;
    box-shadow: 0 0 15px rgba(61, 97, 120, 0.35);
}

/* View Control Buttons */
.view-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-button {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.25), rgba(61, 97, 120, 0.3));
    border: 1px solid rgba(61, 97, 120, 0.4);
    border-radius: 8px;
    color: #f0ebe3;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.control-button:hover {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.4), rgba(61, 97, 120, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(61, 97, 120, 0.25);
}

.control-button:active {
    transform: translateY(0);
}

/* Species Modal */
.species-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(42, 39, 37, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.species-modal.active {
    display: block;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 700;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(231, 76, 60, 0.4);
    transform: rotate(90deg);
}

.modal-header h2 {
    color: #6a9ab5;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.modal-header p {
    color: rgba(240, 235, 227, 0.6);
    font-style: italic;
    margin-bottom: 20px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    color: #6a9ab5;
    font-size: 1em;
    margin-bottom: 10px;
    font-weight: 600;
}

.pra-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.pra-value {
    background: rgba(30, 28, 26, 0.6);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.pra-value.dominant {
    border: 2px solid;
    box-shadow: 0 0 15px;
}

.pra-value-label {
    font-size: 0.75em;
    color: rgba(240, 235, 227, 0.6);
    margin-bottom: 5px;
}

.pra-value-number {
    font-size: 1.3em;
    font-weight: 700;
}

.perceive-color { color: #d6a86c; border-color: #d6a86c; }
.relate-color { color: #6a9ab5; border-color: #6a9ab5; }
.apply-color { color: #c47a52; border-color: #c47a52; }

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    background: rgba(30, 28, 26, 0.6);
    padding: 10px;
    border-radius: 8px;
}

.info-label {
    font-size: 0.75em;
    color: rgba(240, 235, 227, 0.6);
    margin-bottom: 4px;
}

.info-value {
    font-size: 0.9em;
    font-weight: 600;
    color: #f0ebe3;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.modal-overlay.active {
    display: block;
}

/* Sense Info Panel */
.sense-info-panel {
    display: none;
    position: fixed;
    right: 32%;
    top: 20px;
    width: 320px;
    background: rgba(42, 39, 37, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 500;
    max-height: 60vh;
    overflow-y: auto;
}

.sense-info-panel.active {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sense-info-header {
    margin-bottom: 15px;
}

.sense-info-title {
    color: #6a9ab5;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.sense-info-category {
    color: rgba(240, 235, 227, 0.6);
    font-size: 0.8em;
    font-style: italic;
}

.sense-info-shared {
    margin: 15px 0;
    padding: 10px;
    background: rgba(30, 28, 26, 0.6);
    border-radius: 8px;
}

.sense-info-shared-label {
    color: rgba(240, 235, 227, 0.6);
    font-size: 0.75em;
    margin-bottom: 8px;
}

.sense-info-species-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sense-info-species-badge {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.25), rgba(61, 97, 120, 0.3));
    border: 1px solid rgba(61, 97, 120, 0.4);
    color: #f0ebe3;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
}

.sense-info-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: rgba(240, 235, 227, 0.9);
    margin: 16px 0;
    padding: 14px 16px;
    background: rgba(106, 154, 181, 0.06);
    border-left: 3px solid rgba(106, 154, 181, 0.35);
    border-radius: 8px;
}

.sense-info-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sense-info-detail {
    background: rgba(30, 28, 26, 0.6);
    padding: 8px;
    border-radius: 6px;
}

.sense-info-detail-label {
    font-size: 0.7em;
    color: rgba(240, 235, 227, 0.6);
    margin-bottom: 4px;
}

.sense-info-detail-value {
    font-size: 0.85em;
    font-weight: 600;
    color: #f0ebe3;
}

/* Analysis Panel (NEW - Phase 2D) */
.analysis-panel {
    display: none;
    position: fixed;
    right: 32%;
    top: 100px;
    width: 350px;
    background: rgba(42, 39, 37, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(61, 97, 120, 0.35);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 600;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

.analysis-panel.active {
    display: block;
    transform: translateX(0);
}

.analysis-panel::-webkit-scrollbar {
    width: 6px;
}

.analysis-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.analysis-panel::-webkit-scrollbar-thumb {
    background: rgba(61, 97, 120, 0.4);
    border-radius: 10px;
}

.analysis-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 700;
    transition: all 0.3s ease;
}

.analysis-close:hover {
    background: rgba(231, 76, 60, 0.4);
    transform: rotate(90deg);
}

.analysis-header {
    margin-bottom: 20px;
    padding-right: 30px;
}

.analysis-title {
    color: #6a9ab5;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
}

.analysis-context {
    color: rgba(240, 235, 227, 0.7);
    font-size: 0.85em;
    font-style: italic;
}

.analysis-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(61, 97, 120, 0.2);
}

.analysis-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.analysis-section-title {
    color: #6a9ab5;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 10px;
}

.analysis-insight {
    color: rgba(240, 235, 227, 0.9);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 12px;
}

.analysis-metric {
    background: rgba(30, 28, 26, 0.6);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.analysis-metric-label {
    font-size: 0.75em;
    color: rgba(240, 235, 227, 0.6);
    margin-bottom: 4px;
}

.analysis-metric-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #f0ebe3;
}

.analysis-pra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.analysis-pra-item {
    background: rgba(30, 28, 26, 0.6);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.analysis-pra-species {
    font-size: 0.75em;
    color: rgba(240, 235, 227, 0.6);
    margin-bottom: 8px;
}

.analysis-pra-coords {
    font-size: 0.8em;
    font-weight: 600;
    color: #f0ebe3;
}

.analysis-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analysis-badge {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.25), rgba(61, 97, 120, 0.3));
    border: 1px solid rgba(61, 97, 120, 0.4);
    color: #f0ebe3;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.analysis-badge:hover {
    background: linear-gradient(135deg, rgba(61, 97, 120, 0.4), rgba(61, 97, 120, 0.5));
    transform: translateY(-1px);
}

.analysis-species-section {
    margin-bottom: 15px;
}

.analysis-species-name {
    color: #6a9ab5;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 8px;
}

.analysis-list {
    list-style: none;
    padding-left: 0;
}

.analysis-list-item {
    color: rgba(240, 235, 227, 0.85);
    font-size: 0.85em;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}

.analysis-list-item:before {
    content: "•";
    color: #6a9ab5;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Loading State */
.loading-state {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #6a9ab5;
}

.loading-spinner {
    border: 4px solid rgba(106, 154, 181, 0.18);
    border-top: 4px solid #6a9ab5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }

    .map-viewport {
        flex: 0 0 500px;
        border-right: none;
        border-bottom: 1px solid rgba(61, 97, 120, 0.25);
    }

    .controls-panel {
        flex: 1;
        max-height: 400px;
    }

    .curated-sets {
        grid-template-columns: 1fr;
    }

    .analysis-panel,
    .sense-info-panel {
        right: 10px;
        width: calc(100% - 20px);
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5em;
    }

    .map-viewport {
        flex: 0 0 400px;
    }

    .legend-overlay {
        top: 10px;
        left: 10px;
        padding: 10px;
        max-width: 200px;
    }
}

/* ==================================================================
   STEP 2: WELCOME MODAL
   ================================================================== */

.welcome-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.98), rgba(42, 39, 37, 0.98));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(106, 154, 181, 0.25);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.welcome-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-header {
    text-align: center;
    margin-bottom: 25px;
}

.welcome-header h2 {
    color: #6a9ab5;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-header .subtitle {
    color: rgba(240, 235, 227, 0.7);
    font-size: 1.1em;
    font-weight: 300;
}

.welcome-content {
    color: rgba(240, 235, 227, 0.9);
    line-height: 1.7;
    font-size: 1em;
}

.welcome-content p {
    margin-bottom: 18px;
}

.welcome-content strong {
    color: #6a9ab5;
    font-weight: 600;
}

.welcome-steps {
    background: rgba(106, 154, 181, 0.06);
    border-left: 3px solid rgba(106, 154, 181, 0.35);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.welcome-steps h3 {
    color: #6a9ab5;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-steps ol {
    margin-left: 20px;
    color: rgba(240, 235, 227, 0.85);
}

.welcome-steps li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.mobile-notice {
    background: rgba(214, 168, 108, 0.15);
    border: 1px solid rgba(214, 168, 108, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.mobile-notice-icon {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.mobile-notice-text {
    color: #d6a86c;
    font-size: 0.95em;
    font-weight: 500;
}

.welcome-close-btn {
    background: linear-gradient(135deg, #6a9ab5, #3d6178);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.welcome-close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(61, 97, 120, 0.25);
}

.welcome-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(240, 235, 227, 0.6);
    font-size: 1.8em;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    font-family: Arial, sans-serif;
}

.welcome-close-x:hover {
    color: #f0ebe3;
}

/* ==================================================================
   STEP 3: FOOTER & ABOUT PANEL
   ================================================================== */

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(240, 235, 227, 0.06);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(61, 97, 120, 0.25);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    font-size: 0.85em;
}

.footer-left {
    color: rgba(240, 235, 227, 0.7);
}

.footer-left a {
    color: #6a9ab5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-left a:hover {
    color: #7ab0c5;
    text-decoration: underline;
}

.footer-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-link {
    color: rgba(240, 235, 227, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #6a9ab5;
}

.info-icon-btn {
    background: rgba(106, 154, 181, 0.18);
    border: 1px solid rgba(106, 154, 181, 0.35);
    color: #6a9ab5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
    font-weight: bold;
}

.info-icon-btn:hover {
    background: rgba(106, 154, 181, 0.25);
    transform: scale(1.1);
}

.about-panel {
    position: fixed;
    right: -450px;
    top: 0;
    width: 420px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.98), rgba(42, 39, 37, 0.98));
    backdrop-filter: blur(20px);
    border-left: 2px solid rgba(106, 154, 181, 0.25);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    transition: right 0.4s ease-out;
    overflow-y: auto;
    padding: 30px;
}

.about-panel.open {
    right: 0;
}

.about-close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: rgba(240, 235, 227, 0.6);
    font-size: 1.8em;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: Arial, sans-serif;
}

.about-close-btn:hover {
    color: #f0ebe3;
}

.about-content h2 {
    color: #6a9ab5;
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 700;
}

.about-content h3 {
    color: #6a9ab5;
    font-size: 1.2em;
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 600;
}

.about-content p {
    color: rgba(240, 235, 227, 0.85);
    line-height: 1.7;
    margin-bottom: 15px;
}

.about-content a {
    color: #6a9ab5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-content a:hover {
    color: #7ab0c5;
    text-decoration: underline;
}

.about-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(106, 154, 181, 0.18);
}

.about-section:last-child {
    border-bottom: none;
}

/* ==================================================================
   STEP 4: CONTEXTUAL HINTS
   ================================================================== */

.contextual-hint {
    position: absolute;
    background: linear-gradient(135deg, rgba(106, 154, 181, 0.9), rgba(80, 130, 160, 0.95));
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.85em;
    max-width: 250px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10002;
    animation: hintFadeIn 0.4s ease-out;
    pointer-events: none;
}

@keyframes hintFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contextual-hint::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(80, 130, 160, 0.95);
}

.hint-top::after {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom: 8px solid rgba(80, 130, 160, 0.95);
}

.contextual-hint.fade-out {
    animation: hintFadeOut 0.3s ease-out forwards;
}

@keyframes hintFadeOut {
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Adjust main container to account for footer */
.main-container {
    height: calc(100vh - 145px); /* Header (100px) + Footer (45px) */
}

/* ====== AUTH SCREEN ====== */
.auth-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    height: calc(100vh - 145px);
}
.auth-screen.hidden { display: none; }
.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 16px;
    opacity: 0.9;
}
.auth-title {
    font-size: 1.5em;
    font-weight: 600;
    color: #6a9ab5;
    margin-bottom: 8px;
}
.auth-text {
    font-size: 0.95em;
    color: rgba(240, 235, 227, 0.7);
    max-width: 440px;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.7;
}
.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 12px;
    border: 1px solid rgba(106, 154, 181, 0.25);
    background: rgba(240, 235, 227, 0.06);
    color: rgba(240, 235, 227, 0.9);
    font-family: 'Poppins', sans-serif;
    font-size: 1.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}
.auth-btn:hover {
    background: rgba(240, 246, 253, 0.12);
    border-color: rgba(61, 97, 120, 0.4);
    box-shadow: 0 4px 20px rgba(61, 97, 120, 0.2);
}
.auth-btn svg { width: 20px; height: 20px; }
.auth-note {
    margin-top: 20px;
    color: rgba(240, 235, 227, 0.5);
    font-size: 0.85em;
}
/* ====== EMAIL LINK AUTH ====== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px auto;
    width: 100%;
    max-width: 320px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(106, 154, 181, 0.25);
}
.auth-divider span {
    font-size: 0.85em;
    color: rgba(240, 235, 227, 0.5);
}

/* ====== AUTH CONSENT LINE ====== */
.auth-consent {
    margin-top: 12px;
    font-size: 0.8em;
    color: rgba(240, 235, 227, 0.45);
    text-align: center;
    max-width: 360px;
    line-height: 1.5;
}
.auth-consent a {
    color: rgba(157, 170, 236, 0.7);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.auth-consent a:hover {
    color: #6a9ab5;
}
.email-signin-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}
.email-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(106, 154, 181, 0.25);
    background: rgba(240, 235, 227, 0.06);
    color: rgba(240, 235, 227, 0.9);
    font-size: 1em;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}
.email-input:focus {
    border-color: rgba(61, 97, 120, 0.4);
    box-shadow: 0 0 0 3px rgba(111, 154, 76, 0.1);
}
.email-input::placeholder {
    color: rgba(240, 235, 227, 0.4);
}
.email-signin-btn {
    width: 100%;
    padding: 14px 32px;
    border-radius: 12px;
    border: 1px solid rgba(106, 154, 181, 0.25);
    background: rgba(240, 235, 227, 0.06);
    color: rgba(240, 235, 227, 0.9);
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}
.email-signin-btn:hover {
    background: rgba(240, 246, 253, 0.12);
    border-color: rgba(61, 97, 120, 0.4);
}
.email-signin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.email-status {
    font-size: 0.85em;
    color: rgba(111, 154, 76, 0.9);
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}
.email-status.error {
    color: rgba(239, 68, 68, 0.9);
}
