/* Custom Premium Theme Design for Composite Area Game */
:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --accent: #f43f5e;
    --accent-hover: #e11d48;
    
    /* Shape Specific Colors */
    --color-parallelogram: #3b82f6; /* Blue */
    --color-triangle: #10b981;      /* Emerald Green */
    --color-trapezoid: #f59e0b;     /* Amber */
    
    --color-parallelogram-bg: rgba(59, 130, 246, 0.15);
    --color-triangle-bg: rgba(16, 185, 129, 0.15);
    --color-trapezoid-bg: rgba(245, 158, 11, 0.15);

    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg-gradient);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Animated Orbs */
.bg-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-decorations::before, .bg-decorations::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.bg-decorations::before {
    width: 40vw;
    height: 40vw;
    background: var(--primary);
    top: -10%;
    right: -10%;
}

.bg-decorations::after {
    width: 50vw;
    height: 50vw;
    background: var(--color-triangle);
    bottom: -20%;
    left: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 8%) scale(1.1); }
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 95vh;
    min-height: 650px;
}

/* Header */
.global-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.game-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #a5b4fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 1.6rem;
    color: #a5b4fc;
    -webkit-text-fill-color: initial;
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card glassmorphism */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

/* Buttons style */
.icon-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: scale(1.08);
}

.primary-btn, .secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.primary-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.8); }
}

/* Screens toggling */
.screen {
    display: none;
    flex-grow: 1;
    width: 100%;
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Screen */
#welcomeScreen .welcome-card {
    max-width: 600px;
    margin: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.badge {
    background: var(--primary-light);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1 {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1.25;
}

.highlight {
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 500px;
}

.welcome-visual {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 16px;
    width: 100%;
    max-width: 320px;
}

.preview-svg {
    width: 100%;
    height: auto;
}

.preview-shape {
    fill: opacity 0.3;
    stroke-width: 2.5;
}

.shape-rect {
    fill: var(--color-parallelogram-bg);
    stroke: var(--color-parallelogram);
}

.shape-tri {
    fill: var(--color-triangle-bg);
    stroke: var(--color-triangle);
}

.preview-label {
    fill: var(--text);
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
}

/* Map Screen */
.map-container {
    max-width: 900px;
    margin: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.screen-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.screen-title h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.back-btn-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.back-btn-small:hover {
    background: rgba(255, 255, 255, 0.15);
}

.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.level-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.level-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.level-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
}

.level-number {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.level-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.level-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.level-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
    margin-top: 8px;
}

.stars {
    color: #e2e8f0;
    display: flex;
    gap: 4px;
}

.stars .fa-star {
    font-size: 0.95rem;
}

.stars .star-active {
    color: #fbbf24;
}

.status-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.level-play-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.level-play-btn:hover {
    background: var(--primary-hover);
}

/* Gameplay Screen layout */
.game-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.game-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.game-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    max-width: 600px;
    justify-content: center;
}

.progress-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    flex-grow: 1;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--color-triangle));
    border-radius: 5px;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fbbf24;
}

.main-play-area {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 16px;
    flex-grow: 1;
    min-height: 0; /* allows grid children to shrink below content size */
}

/* Panels */
.canvas-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}

.workspace-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    min-height: 0;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.panel-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-badge {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.svg-container {
    flex-grow: 1;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px;
    min-height: 250px;
}

#compositeGeometrySvg {
    width: 100%;
    height: 100%;
    max-height: 340px;
}

.helper-tips {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.helper-tips i {
    color: #fbbf24;
}

/* Steps in Workspace */
.step-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-section.locked {
    opacity: 0.4;
    pointer-events: none;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-num {
    background: var(--primary);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Shape selection buttons */
.shape-selector-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.shape-select-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 12px 6px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
}

.shape-select-btn i, .shape-select-btn svg {
    font-size: 1.4rem;
}

.shape-select-btn svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.shape-select-btn[data-shape="parallelogram"]:hover {
    background: var(--color-parallelogram-bg);
    border-color: var(--color-parallelogram);
    color: #60a5fa;
}

.shape-select-btn[data-shape="triangle"]:hover {
    background: var(--color-triangle-bg);
    border-color: var(--color-triangle);
    color: #34d399;
}

.shape-select-btn[data-shape="trapezoid"]:hover {
    background: var(--color-trapezoid-bg);
    border-color: var(--color-trapezoid);
    color: #fbbf24;
}

/* Formulas List */
.formulas-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 80px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.85rem;
}

.empty-state i {
    font-size: 1.5rem;
}

/* Formula calculation card */
.formula-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.formula-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.formula-card-title {
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delete-formula-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 2px;
    transition: var(--transition);
}

.delete-formula-btn:hover {
    color: var(--accent);
}

.formula-expression {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.02);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Input layout inside formula */
.formula-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    flex-wrap: wrap;
}

.formula-inputs input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 54px;
    height: 36px;
    border-radius: 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.formula-inputs input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.formula-inputs input::-webkit-inner-spin-button, 
.formula-inputs input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.formula-inputs input[type=number] {
    -moz-appearance: textfield;
}

.formula-inputs .result-input {
    width: 68px;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(30, 41, 59, 0.8);
}

.verify-part-btn {
    background: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.verify-part-btn:hover {
    background: var(--primary);
    color: white;
}

/* Color themed borders/titles */
.formula-card.parallelogram-theme {
    border-left: 4px solid var(--color-parallelogram);
}
.formula-card.parallelogram-theme .formula-card-title {
    color: #60a5fa;
}

.formula-card.triangle-theme {
    border-left: 4px solid var(--color-triangle);
}
.formula-card.triangle-theme .formula-card-title {
    color: #34d399;
}

.formula-card.trapezoid-theme {
    border-left: 4px solid var(--color-trapezoid);
}
.formula-card.trapezoid-theme .formula-card-title {
    color: #fbbf24;
}

/* Locked Card styling */
.formula-card.correct {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
    border-left-width: 4px;
}
.formula-card.correct input {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: #34d399;
    pointer-events: none;
}
.formula-card.correct .verify-part-btn, 
.formula-card.correct .delete-formula-btn {
    display: none;
}

.check-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

/* Step 3: Total Area */
.total-calc-container {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.total-calc-expression {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 700;
    justify-content: center;
    font-size: 1rem;
}

.total-part-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: inline-block;
    color: white;
}

.select-op {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 6px;
    border-radius: 6px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

.total-calc-expression .result-input-large {
    width: 80px;
    height: 40px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 8px;
    outline: none;
}

.total-calc-expression .result-input-large:focus {
    border-color: var(--primary);
}

.total-calc-submit {
    display: flex;
    justify-content: center;
}

/* Modal dialog styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#fireworksCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 101;
}

.feedback-card {
    max-width: 450px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 102;
}

.feedback-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.2rem;
}

.feedback-icon.success-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 2px solid var(--success);
}

.feedback-icon.error-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 2px solid var(--error);
}

.explanation-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.feedback-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.feedback-actions button {
    flex: 1;
}

/* Complete Screen */
.complete-card {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.trophy-container {
    background: rgba(251, 191, 36, 0.1);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #fbbf24;
}

.trophy-icon {
    font-size: 3rem;
    color: #fbbf24;
}

.final-stars-container {
    display: flex;
    gap: 10px;
    color: #fbbf24;
    font-size: 2.2rem;
    margin: 10px 0;
}

.score-summary-details {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.summary-item .label {
    color: var(--text-muted);
}

.summary-item .val {
    color: var(--text);
}

.complete-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.complete-actions button {
    flex: 1;
}

/* Animations */
.animate-pop {
    animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes pop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* SVG Highlight styles when active */
.svg-region {
    transition: fill 0.3s ease, fill-opacity 0.3s ease;
    cursor: pointer;
}

.svg-region.hovered, .svg-region.selected-part {
    fill-opacity: 0.45 !important;
}

.parallelogram-fill {
    fill: var(--color-parallelogram);
    fill-opacity: 0.15;
    stroke: var(--color-parallelogram);
    stroke-width: 2.5;
}

.triangle-fill {
    fill: var(--color-triangle);
    fill-opacity: 0.15;
    stroke: var(--color-triangle);
    stroke-width: 2.5;
}

.trapezoid-fill {
    fill: var(--color-trapezoid);
    fill-opacity: 0.15;
    stroke: var(--color-trapezoid);
    stroke-width: 2.5;
}

.dimension-line {
    stroke: #e2e8f0;
    stroke-width: 1.5;
}

.dimension-dash {
    stroke: #94a3b8;
    stroke-dasharray: 4, 4;
    stroke-width: 1.5;
}

.dimension-text {
    fill: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.9);
}

/* Responsive adjustments */
@media(max-width: 900px) {
    .app-container {
        height: auto;
        overflow-y: auto;
    }
    
    .main-play-area {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .svg-container {
        min-height: 250px;
    }
}
