/* ========================================
   FaceTeller - Mien Shiang Face Reading App
   Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-gold: #d4af37;
    --accent-red: #c41e3a;
    --text-light: #f5f5f5;
    --text-muted: #a0a0a0;
    --bg-dark: #0f0f1a;
    --bg-card: #1e1e3f;
    --success: #4caf50;
    --warning: #ff9800;
    --depth-deep: #1e3a8a;
    --depth-protruding: #dc2626;
    --depth-neutral: #6b7280;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand .logo {
    font-size: 2rem;
    color: var(--accent-gold);
}

.nav-brand .brand-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 5rem 5rem;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero-decoration {
    margin: 2rem 0;
}

.yin-yang {
    font-size: 4rem;
    color: var(--accent-gold);
    animation: rotate 20s linear infinite;
    display: inline-block;
}

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

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-gold), #b8941d);
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-icon {
    font-size: 1.3rem;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.face-outline {
    width: 300px;
    height: 400px;
    border: 3px solid var(--accent-gold);
    border-radius: 50% 50% 45% 45%;
    position: relative;
    opacity: 0.3;
}

.palace-marker {
    position: absolute;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent-gold);
    border-radius: 20px;
    background: rgba(26, 26, 46, 0.8);
}

.palace-marker[data-palace="heaven"] {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.palace-marker[data-palace="human"] {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.palace-marker[data-palace="earth"] {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    padding: 6rem 5rem;
    background: var(--primary-color);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.divider {
    color: var(--accent-gold);
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
}

.courts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.court-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
}

.court-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.court-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.court-card h3 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.court-location {
    color: var(--accent-red);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.court-meaning {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ========================================
   Reading Section
   ======================================== */
.reading-section {
    padding: 6rem 5rem;
    background: var(--bg-dark);
}

/* Upload Area */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
}

.upload-area {
    border: 3px dashed var(--accent-gold);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(30, 30, 63, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    background: rgba(30, 30, 63, 0.8);
    border-color: var(--accent-red);
}

.upload-area.dragover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-red);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.upload-area h3 {
    color: var(--accent-gold);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.upload-btn {
    padding: 1rem 2rem;
    background: var(--accent-gold);
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: var(--accent-red);
    color: var(--text-light);
}

.upload-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.camera-option {
    text-align: center;
    margin-top: 2rem;
}

.camera-option p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.camera-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.camera-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-color);
}

/* Camera Interface */
.camera-interface {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#cameraVideo {
    width: 100%;
    display: block;
}

.camera-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.capture-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-gold);
    border: 4px solid var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.capture-btn:hover {
    transform: scale(1.1);
    background: var(--accent-red);
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    border: 2px solid var(--text-light);
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

/* Analysis Container */
.analysis-container {
    max-width: 900px;
    margin: 0 auto;
}

.image-preview-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

.image-container {
    position: relative;
    display: inline-block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

#previewImage {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

.overlay-canvas,
.mesh-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.debug-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 10px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.toggle:hover {
    color: var(--accent-gold);
}

.toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
}

/* Analysis Progress */
.analysis-progress {
    text-align: center;
    padding: 3rem;
}

.progress-ring {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--bg-card);
    stroke-width: 8;
}

.progress-bar {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: var(--accent-gold);
}

.progress-status {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.analyze-btn,
.retake-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.analyze-btn {
    background: linear-gradient(135deg, var(--accent-gold), #b8941d);
    color: var(--primary-color);
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.retake-btn {
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--text-muted);
}

.retake-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ========================================
   Results Section
   ======================================== */
.results-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.results-header h3 {
    color: var(--accent-gold);
    font-size: 1.8rem;
}

.confidence-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 20px;
}

.confidence-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.confidence-score {
    color: var(--success);
    font-weight: 600;
    font-family: 'Cinzel', serif;
}

/* Palaces Grid */
.palaces-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.palace-item {
    background: var(--primary-color);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-gold);
    transition: all 0.3s ease;
}

.palace-item:hover {
    transform: translateX(5px);
    border-left-color: var(--accent-red);
}

.palace-name {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.palace-location {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    font-style: italic;
}

.palace-reading {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.palace-intensity {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.palace-intensity.subtle {
    background: rgba(107, 114, 128, 0.3);
    color: var(--text-muted);
}

.palace-intensity.prominent {
    background: rgba(212, 175, 55, 0.3);
    color: var(--accent-gold);
}

.palace-intensity.dominant {
    background: rgba(196, 30, 58, 0.3);
    color: var(--accent-red);
}

/* Traits Section */
.traits-section {
    margin-bottom: 2rem;
}

.traits-section h4 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.traits-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trait-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--primary-color);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.1);
}

.trait-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.trait-content {
    flex: 1;
}

.trait-name {
    font-family: 'Cinzel', serif;
    color: var(--accent-gold);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.trait-reading {
    color: var(--text-light);
    line-height: 1.6;
}

.trait-level {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.trait-level.high {
    background: rgba(196, 30, 58, 0.3);
    color: var(--accent-red);
}

.trait-level.medium {
    background: rgba(212, 175, 55, 0.3);
    color: var(--accent-gold);
}

.trait-level.low {
    background: rgba(107, 114, 128, 0.3);
    color: var(--text-muted);
}

/* Combo & Asymmetry Readings */
.combo-reading,
.asymmetry-reading {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(196, 30, 58, 0.1));
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.combo-reading h4,
.asymmetry-reading h4 {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.combo-reading p,
.asymmetry-reading p {
    color: var(--text-light);
    line-height: 1.7;
    font-style: italic;
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.download-pdf-btn,
.share-card-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-pdf-btn {
    background: var(--accent-gold);
    color: var(--primary-color);
}

.download-pdf-btn:hover {
    background: #b8941d;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.share-card-btn {
    background: transparent;
    color: var(--accent-gold);
    border: 2px solid var(--accent-gold);
}

.share-card-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-color);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--accent-gold);
}

.modal-content h3 {
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 1.5rem;
}

.share-card-preview {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 25px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.download-card-btn {
    background: var(--accent-gold);
    color: var(--primary-color);
}

.twitter-share-btn {
    background: #1da1f2;
    color: white;
}

/* ========================================
   Pro Scan Section
   ======================================== */
.pro-scan-section {
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(196, 30, 58, 0.05));
    border-radius: 20px;
    border: 2px solid var(--accent-gold);
    text-align: center;
}

.pro-scan-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pro-badge {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-red));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.pro-scan-section h3 {
    color: var(--accent-gold);
    font-size: 1.5rem;
}

.pro-scan-section > p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pro-scan-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent-gold);
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pro-scan-btn:hover {
    background: var(--accent-red);
    color: var(--text-light);
}

/* Pro Scan Interface */
.pro-scan-interface {
    margin-top: 2rem;
}

.angle-uploads {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.angle-slot {
    aspect-ratio: 1;
    background: var(--primary-color);
    border: 2px dashed var(--text-muted);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.angle-slot:hover {
    border-color: var(--accent-gold);
}

.angle-slot.filled {
    border-style: solid;
    border-color: var(--success);
}

.angle-preview {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.angle-label {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
}

.angle-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pro-scan-actions {
    margin-bottom: 1.5rem;
}

.process-pro-btn {
    padding: 1rem 2rem;
    background: var(--accent-gold);
    color: var(--primary-color);
    border: none;
    border-radius: 30px;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.process-pro-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.process-pro-btn:not(:disabled):hover {
    background: var(--accent-red);
    color: var(--text-light);
}

.three-container {
    width: 100%;
    height: 400px;
    background: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--primary-color);
    padding: 3rem 5rem;
    text-align: center;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand .logo {
    font-size: 2rem;
    color: var(--accent-gold);
}

.footer-brand .brand-name {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   Loading Overlay
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-card);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 1.5rem;
    color: var(--accent-gold);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 7rem 2rem 4rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-visual {
        display: none;
    }

    .courts-grid {
        grid-template-columns: 1fr;
    }

    .palaces-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .angle-uploads {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .about-section,
    .reading-section {
        padding: 4rem 1.5rem;
    }

    .palaces-grid {
        grid-template-columns: 1fr;
    }

    .results-actions {
        flex-direction: column;
    }

    .modal-actions {
        flex-direction: column;
    }

    .angle-uploads {
        grid-template-columns: repeat(2, 1fr);
    }

    .debug-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.hidden {
    display: none !important;
}

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

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

/* Depth color coding for mesh visualization */
.vertex-deep {
    color: var(--depth-deep);
}

.vertex-protruding {
    color: var(--depth-protruding);
}

.vertex-neutral {
    color: var(--depth-neutral);
}
