:root {
    --primary-color: #006D77;
    --secondary-color: #F8F9FA;
    --text-color: #343A40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #FFBA08;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #343a40;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-heavy: rgba(0, 0, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #006D77 0%, #83C5BE 100%);
    --gradient-secondary: linear-gradient(135deg, #FFBA08 0%, #FAD5A5 100%);
    --gradient-success: linear-gradient(135deg, #FFBA08 0%, #F4A261 100%);
    --primary-dark: #00565e;
}

.dark-mode {
    --bg-primary: #1a1d23;
    --bg-secondary: #252832;
    --bg-tertiary: #2f3349;
    --text-primary: #e8eaed;
    --text-secondary: #c4c7c5;
    --text-muted: #9aa0a6;
    --border-color: #3c4043;
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.25);
    --shadow-heavy: rgba(0, 0, 0, 0.35);
    --primary-color: #4fc3c7;
    --success-color: #ffd60a;
    --primary-dark: #37a0a4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: "Tajawal", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease-out;
    overflow-x: hidden;
}

/* Changed position to absolute */
.magical-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    perspective: 1500px;
}

.floating-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 109, 119, 0.1), transparent);
    backdrop-filter: blur(20px);
    animation: magicalFloat 8s ease-in-out infinite;
    transform-style: preserve-3d;
}

.orb-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 10%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 109, 119, 0.15), rgba(131, 197, 190, 0.1));
    animation-delay: 0s;
    animation-duration: 12s;
}

.orb-2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 15%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 186, 8, 0.15), rgba(0, 109, 119, 0.1));
    animation-delay: -2s;
    animation-duration: 10s;
}

.orb-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 109, 119, 0.15), rgba(255, 186, 8, 0.1));
    animation-delay: -4s;
    animation-duration: 14s;
}

.orb-4 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 30%;
    background: radial-gradient(circle at 30% 30%, rgba(131, 197, 190, 0.15), rgba(0, 109, 119, 0.1));
    animation-delay: -6s;
    animation-duration: 8s;
}

.orb-5 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    right: 10%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 186, 8, 0.15), rgba(0, 109, 119, 0.1));
    animation-delay: -8s;
    animation-duration: 16s;
}

.geometric-shape {
    position: absolute;
    transform-style: preserve-3d;
    animation: geometricRotate 20s linear infinite;
}

.shape-1 {
    width: 0;
    height: 0;
    top: 15%;
    left: 70%;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid rgba(0, 109, 119, 0.15);
    animation-delay: 0s;
    filter: blur(1px);
}

.shape-2 {
    width: 40px;
    height: 40px;
    top: 70%;
    left: 5%;
    background: rgba(255, 186, 8, 0.15);
    transform: rotate(45deg);
    animation-delay: -5s;
    filter: blur(1px);
}

.shape-3 {
    width: 60px;
    height: 60px;
    top: 40%;
    right: 5%;
    background: rgba(131, 197, 190, 0.15);
    border-radius: 50% 0 50% 0;
    animation-delay: -10s;
    filter: blur(1px);
}

.magic-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, rgba(0, 109, 119, 0.8), transparent);
    border-radius: 50%;
    animation: magicalParticles 15s linear infinite;
    transform-style: preserve-3d;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: radial-gradient(circle, rgba(0, 109, 119, 0.8), transparent);
}

.particle:nth-child(2) {
    top: 40%;
    left: 30%;
    animation-delay: -2s;
    background: radial-gradient(circle, rgba(255, 186, 8, 0.8), transparent);
}

.particle:nth-child(3) {
    top: 60%;
    left: 50%;
    animation-delay: -4s;
    background: radial-gradient(circle, rgba(131, 197, 190, 0.8), transparent);
}

.particle:nth-child(4) {
    top: 80%;
    left: 70%;
    animation-delay: -6s;
    background: radial-gradient(circle, rgba(0, 109, 119, 0.8), transparent);
}

.particle:nth-child(5) {
    top: 30%;
    left: 80%;
    animation-delay: -8s;
    background: radial-gradient(circle, rgba(255, 186, 8, 0.8), transparent);
}

.particle:nth-child(6) {
    top: 50%;
    left: 20%;
    animation-delay: -10s;
    background: radial-gradient(circle, rgba(0, 109, 119, 0.8), transparent);
}

.particle:nth-child(7) {
    top: 70%;
    left: 40%;
    animation-delay: -12s;
    background: radial-gradient(circle, rgba(131, 197, 190, 0.8), transparent);
}

.particle:nth-child(8) {
    top: 10%;
    left: 60%;
    animation-delay: -14s;
    background: radial-gradient(circle, rgba(255, 186, 8, 0.8), transparent);
}

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .form-grid {
    direction: rtl;
}

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-controls {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    transform-style: preserve-3d;
}

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
    animation: slideInRight 0.6s ease-out;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    transform-style: preserve-3d;
    box-shadow: 0 4px 12px rgba(0, 109, 119, 0.2);
}

.footer-logo .logo-icon {
    animation: magicalLogoFloat 6s ease-in-out infinite;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle,
.language-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
	max-height: 34px;
}

.theme-toggle::before,
.language-toggle::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 109, 119, 0.1), transparent);
    transition: left 0.5s;
}

.theme-toggle:hover::before,
.language-toggle:hover::before {
    left: 100%;
}

.theme-toggle:hover,
.language-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px) translateZ(5px);
    box-shadow: 0 6px 20px var(--shadow-medium);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.language-toggle {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    overflow: hidden;
    transform-style: preserve-3d;
    padding: 0.5rem 1rem;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    padding: 0;
}

.lang-btn:hover {
    color: var(--primary-color);
    transform: translateZ(2px);
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.lang-separator {
    color: var(--border-color);
    font-size: 0.875rem;
}

.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    padding: 4rem 0;
    text-align: center;
    animation: fadeInUp 1s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(0, 109, 119, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 70%, rgba(255, 186, 8, 0.08) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(131, 197, 190, 0.05) 0%, transparent 70%);
    transform: translateZ(-50px);
    z-index: -1;
    animation: magicalBackground 12s ease-in-out infinite;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    animation: magicalTitleScale 1.2s ease-out 0.4s both;
    transform-style: preserve-3d;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: magicalFadeIn 1s ease-out 0.8s both;
    transform-style: preserve-3d;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.main {
    padding: 4rem 0;
    position: relative;
}

.prediction-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    transform-style: preserve-3d;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
    transform: translateZ(2px);
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    transform-style: preserve-3d;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px var(--shadow-light);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 109, 119, 0.1), 0 4px 12px var(--shadow-medium);
    transform: translateY(-2px) translateZ(4px);
    background: var(--bg-secondary);
}

input[type="text"]:hover,
input[type="number"]:hover,
select:hover {
    border-color: rgba(0, 109, 119, 0.4);
    transform: translateY(-1px) translateZ(2px);
    box-shadow: 0 3px 10px var(--shadow-light);
}

select {
    cursor: pointer;
    appearance: none;
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

.dark-mode select {
    cursor: pointer;
    appearance: none;
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23e8eaed' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-grid .form-group:nth-child(odd) {
    animation: slideInLeft 0.6s ease-out calc(var(--i, 0) * 0.1s) both;
}

.form-grid .form-group:nth-child(even) {
    animation: slideInRight 0.6s ease-out calc(var(--i, 0) * 0.1s) both;
}

.features-section {
    margin-bottom: 2rem;
}

.features-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-toggle {
    display: flex;
    align-items: center;
    animation: slideInRight 0.6s ease-out both;
}

.feature-toggle:nth-child(1) {
    animation-delay: 0.7s;
}

.feature-toggle:nth-child(2) {
    animation-delay: 0.8s;
}

.feature-toggle:nth-child(3) {
    animation-delay: 0.9s;
}

.feature-toggle:nth-child(4) {
    animation-delay: 1s;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 3rem;
    height: 1.5rem;
    background: var(--border-color);
    border-radius: 1rem;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    transform-style: preserve-3d;
    backdrop-filter: blur(5px);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    top: 0.125rem;
    left: 0.125rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateZ(2px);
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider {
    background: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 109, 119, 0.3);
    transform: translateZ(4px);
}

.toggle-label input[type="checkbox"]:checked+.toggle-slider::before {
    transform: translateX(1.5rem) translateZ(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toggle-label:hover .toggle-slider::before {
    transform: scale(1.1) translateZ(2px);
}

.predict-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 109, 119, 0.2);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    backdrop-filter: blur(10px);
	font-family: "Tajawal", -apple-system, BlinkMacSystemFont, sans-serif;
}

.predict-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.predict-btn:hover::before {
    left: 100%;
}

.predict-btn:hover {
    transform: translateY(-3px) scale(1.02) translateZ(8px);
    box-shadow: 0 8px 25px rgba(0, 109, 119, 0.3);
    background: linear-gradient(135deg, #006D77 0%, #83C5BE 50%, #FFBA08 100%);
}

.predict-btn:active {
    transform: translateY(-1px) scale(0.98) translateZ(4px);
}

.results-section {
    position: sticky;
    top: 6rem;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    transform-style: preserve-3d;
}

.results-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 12px var(--shadow-light);
    min-height: 400px;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    transform: translateZ(0);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.results-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(0, 109, 119, 0.2), rgba(255, 186, 8, 0.2), rgba(131, 197, 190, 0.2));
    border-radius: 0.75rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.results-card:hover::before {
    opacity: 1;
}

.results-card:hover {
    box-shadow: 0 12px 30px var(--shadow-medium);
    transform: translateY(-4px) translateZ(12px);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.price-display {
    text-align: center;
    margin-bottom: 2rem;
}

.price-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

.price-value:hover {
    transform: scale(1.05) translateZ(8px);
}

.price-value .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--success-color);
    animation: magicalPriceScale 1s ease-out;
    transform-style: preserve-3d;
}

.price-value .currency {
    font-size: 2rem;
    color: var(--text-secondary);
}

.price-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.price-breakdown h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.factor-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.factor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    cursor: pointer;
    transform-style: preserve-3d;
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.factor-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 109, 119, 0.1), transparent);
    transition: left 0.5s;
}

.factor-item:hover::before {
    left: 100%;
}

.factor-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(8px) translateZ(4px);
    box-shadow: 0 6px 15px var(--shadow-light);
}

.factor-impact {
    font-weight: 600;
    color: var(--success-color);
}

.factor-impact:first-child {
    color: var(--error-color);
}

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0 1rem;
    margin-top: 4rem;
    transform-style: preserve-3d;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo .logo-icon {
    width: 2rem;
    height: 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .prediction-interface {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .results-section {
        position: static;
    }

    .amount {
        font-size: 2rem;
    }

    .currency {
        font-size: 1.5rem;
    }

    .header-controls {
        gap: 0.5rem;
		flex-direction: row;
		align-items: center; 
		gap: 0.5rem;
    }

    .language-toggle {
        flex-direction: row;
		max-height: unset;
		padding: 0.5rem 0.75rem;
    }
	
	
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .input-section,
    .results-card {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .main {
        padding: 2rem 0;
    }

    .header-controls {
        flex-direction: row;
        gap: 0.5rem;

    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes magicalFloat {
    0%,
    100% {
        transform: translateY(0px) translateX(0px) rotateZ(0deg) translateZ(0px);
    }

    25% {
        transform: translateY(-15px) translateX(8px) rotateZ(3deg) translateZ(5px);
    }

    50% {
        transform: translateY(-25px) translateX(-3px) rotateZ(0deg) translateZ(10px);
    }

    75% {
        transform: translateY(-15px) translateX(-8px) rotateZ(-3deg) translateZ(5px);
    }
}

@keyframes geometricRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(0px);
    }

    25% {
        transform: rotateX(90deg) rotateY(90deg) rotateZ(90deg) translateZ(10px);
    }

    50% {
        transform: rotateX(180deg) rotateY(180deg) rotateZ(180deg) translateZ(0px);
    }

    75% {
        transform: rotateX(270deg) rotateY(270deg) rotateZ(270deg) translateZ(-10px);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg) translateZ(0px);
    }
}

@keyframes magicalParticles {
    0% {
        transform: translateY(0) translateX(0) rotateZ(0deg) scale(0) translateZ(0px);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: scale(1) translateZ(2px);
    }

    50% {
        transform: translateY(-40vh) translateX(60px) rotateZ(180deg) scale(1.2) translateZ(8px);
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-80vh) translateX(120px) rotateZ(360deg) scale(0) translateZ(0px);
        opacity: 0;
    }
}

@keyframes magicalLogoFloat {
    0%,
    100% {
        transform: translateY(0px) rotateY(0deg) translateZ(0px) scale(1);
    }

    25% {
        transform: translateY(-4px) rotateY(5deg) translateZ(4px) scale(1.02);
    }

    50% {
        transform: translateY(-8px) rotateY(0deg) translateZ(8px) scale(1.05);
    }

    75% {
        transform: translateY(-4px) rotateY(-5deg) translateZ(4px) scale(1.02);
    }
}

@keyframes magicalBackground {
    0%,
    100% {
        transform: translateZ(-50px) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateZ(-30px) scale(1.05);
        opacity: 0.9;
    }
}

@keyframes magicalTitleScale {
    from {
        opacity: 0;
        transform: scale(0.7) rotateX(15deg) translateZ(-30px);
    }

    to {
        opacity: 1;
        transform: scale(1) rotateX(0deg) translateZ(0px);
    }
}

@keyframes magicalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(10deg) translateZ(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg) translateZ(0px);
    }
}

@keyframes magicalPriceScale {
    from {
        opacity: 0;
        transform: scale(0.5) rotateY(90deg) translateZ(-30px);
    }

    to {
        opacity: 1;
        transform: scale(1) rotateY(0deg) translateZ(0px);
    }
}

@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 768px) {
    .orb-2,
    .orb-3,
    .orb-4,
    .orb-5 {
        display: none;
    }

}

/* Fixes for smaller screens */

select {
    padding-right: 2.5rem !important;
}

/* Reduced spacing for screens under 1600px */
@media (max-width: 1600px) {
    .hero {
        padding: 2.5rem 0;
    }
    
    .main {
        padding: 2.5rem 0;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-grid {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .features-section {
        margin-bottom: 1.5rem;
    }
    
    .features-section h3 {
        margin-bottom: 0.75rem;
    }
    
    input[type="text"],
    input[type="number"],
    select {
        padding: 0.75rem;
    }
    
    .results-card {
        padding: 1.5rem;
        min-height: 300px;
    }
    
    .price-display {
        margin-bottom: 1.5rem;
    }
    
    /* Keep original price display sizes - no changes needed */
    
    .results-header {
        margin-bottom: 1.5rem;
    }
}

/* For constrained screen heights */
@media (max-height: 800px) {
    .hero {
        padding: 1.5rem 0;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem; /* Reduced */
        margin-bottom: 0.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem; /* Reduced */
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-grid {
        gap: 0.875rem;
        margin-bottom: 1.25rem;
    }
    
    .predict-btn {
        padding: 0.875rem 1.5rem; /* Reduced */
        font-size: 1rem; /* Reduced */
    }
    
    .results-card {
        min-height: 250px;
        padding: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.375rem; /* Add this rule */
        margin-bottom: 0.5rem;
    }
    
    .section-header p {
        font-size: 0.875rem; /* Add this rule */
        margin-bottom: 1rem;
    }
}

@media (max-width: 1600px) and (max-height: 800px) {
    .prediction-interface {
        gap: 2rem; /* Reduced from 3rem */
    }
    
    .form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .features-grid {
        gap: 0.75rem;
    }
    
    .toggle-label {
        gap: 0.5rem;
    }
    
    .toggle-slider {
        width: 2.5rem; 
        height: 1.25rem; 
    }
    
    .toggle-slider::before {
        width: 1rem; 
        height: 1rem; 
        top: 0.125rem;
        left: 0.125rem;
    }
    
    .toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
        transform: translateX(1.25rem) translateZ(4px);
    }

    .orb-3,
    .orb-5 {
        display: none;
    }
}

@media (max-width: 460px){
    #floor::placeholder {
        color: transparent;
    }    
}


/* Compare with Listed Price Widget */
.compare-listed-price {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease;
}

.compare-listed-price h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.compare-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compare-input-group input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.compare-input-group input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.compare-input-group input:focus {
    border-color: var(--primary-color);
}

.judge-btn {
    padding: 10px 16px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: "Tajawal", -apple-system, BlinkMacSystemFont, sans-serif;
}

.judge-btn:hover {
    background-color: var(--primary-dark);
}

.judge-result {
    margin-top: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--success-color);
}

::-webkit-scrollbar {
  width: 10px;
}


::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--success-color); 
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
