@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

:root {
    --background: 270 50% 8%;
    --foreground: 45 100% 95%;
    --card: 270 40% 12%;
    --card-foreground: 45 100% 95%;
    --primary: 270 70% 55%;
    --primary-foreground: 0 0% 100%;
    --secondary: 45 90% 55%;
    --secondary-foreground: 270 50% 8%;
    --accent: 45 100% 60%;
    --accent-foreground: 270 50% 8%;
    --muted: 270 30% 20%;
    --muted-foreground: 270 10% 70%;
    --border: 270 40% 25%;
    --input: 270 40% 15%;
    --ring: 45 90% 55%;

    --vowel-fatha: 0 85% 65%;
    --vowel-kasra: 280 70% 60%;
    --vowel-damma: 200 75% 60%;
    --vowel-other: 340 70% 65%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, hsl(270 50% 8%) 0%, hsl(270 40% 12%) 50%, hsl(270 50% 8%) 100%);
    background-attachment: fixed;
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.icon {
    color: hsl(var(--secondary));
    filter: drop-shadow(0 0 8px hsl(var(--secondary) / 0.5));
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 50%, hsl(var(--primary)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px hsl(var(--secondary) / 0.3));
}

.subtitle {
    font-size: 1.25rem;
    color: hsl(var(--muted-foreground));
}

.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px hsl(270 70% 20% / 0.3),
                inset 0 1px 0 hsl(270 100% 80% / 0.1);
    backdrop-filter: blur(10px);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-description {
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
}

.badge {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(270 70% 45%));
    color: hsl(var(--primary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.4);
}

.badge-secondary {
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(45 100% 50%));
    color: hsl(var(--secondary-foreground));
    box-shadow: 0 4px 12px hsl(var(--secondary) / 0.4);
}

.features-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.features-list li {
    padding: 0.5rem 0;
    color: hsl(var(--muted-foreground));
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(270 70% 45%));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.4);
    border: 1px solid hsl(var(--primary) / 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px hsl(var(--primary) / 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(45 100% 50%));
    color: hsl(var(--secondary-foreground));
    box-shadow: 0 4px 16px hsl(var(--secondary) / 0.4);
    border: 1px solid hsl(var(--secondary) / 0.5);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px hsl(var(--secondary) / 0.6);
}

.btn-outline {
    background: hsl(var(--card) / 0.5);
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.5);
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.2);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-mode {
    flex: 1;
    min-width: 80px;
}

.btn-mode.active {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(270 70% 45%));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.5);
    border: 1px solid hsl(var(--primary) / 0.8);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.flex-1 {
    flex: 1;
}

.actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    animation: fadeIn 0.5s ease-out;
}

.select {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    background: linear-gradient(135deg, hsl(var(--input)) 0%, hsl(270 45% 13%) 100%);
    color: hsl(var(--foreground));
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px hsl(270 70% 20% / 0.2),
                inset 0 1px 0 hsl(270 100% 80% / 0.05);
    position: relative;
    backdrop-filter: blur(10px);
}

.select:hover {
    border-color: hsl(var(--primary) / 0.7);
    box-shadow: 0 6px 24px hsl(var(--primary) / 0.3),
                inset 0 1px 0 hsl(270 100% 80% / 0.1);
    transform: translateY(-2px);
    background: linear-gradient(135deg, hsl(270 45% 15%) 0%, hsl(270 50% 11%) 100%);
}

.select:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.25),
                0 8px 32px hsl(var(--primary) / 0.4);
    outline: none;
    transform: translateY(-2px);
}

.select option {
    padding: 1rem 1.25rem;
    background: hsl(270 50% 10%);
    color: hsl(var(--foreground));
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.select option:hover {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15), hsl(270 55% 12%));
    color: hsl(var(--secondary));
    border-bottom-color: hsl(var(--secondary) / 0.4);
    padding-left: 1.5rem;
}

.select option:checked {
    background: linear-gradient(135deg, hsl(var(--primary) / 0.3), hsl(var(--secondary) / 0.15));
    color: hsl(var(--secondary));
    font-weight: 600;
    border-bottom-color: hsl(var(--secondary) / 0.6);
    box-shadow: inset 4px 0 0 hsl(var(--secondary));
}

.select option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sourate-name {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.sourate-translation {
    color: hsl(var(--muted-foreground));
}

.verset-position {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-top: 1rem;
}

.option-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.mode-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.slider-container {
    margin-bottom: 1.5rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.slider-label {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.slider-label .accent {
    background: linear-gradient(to right, hsl(var(--secondary)), hsl(45 100% 50%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px hsl(var(--secondary) / 0.3));
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, hsl(var(--muted)), hsl(var(--primary) / 0.3));
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(45 100% 50%));
    cursor: pointer;
    border: 3px solid hsl(var(--background));
    box-shadow: 0 4px 12px hsl(var(--secondary) / 0.5);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px hsl(var(--secondary) / 0.7);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--secondary)), hsl(45 100% 50%));
    cursor: pointer;
    border: 3px solid hsl(var(--background));
    box-shadow: 0 4px 12px hsl(var(--secondary) / 0.5);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px hsl(var(--secondary) / 0.7);
}

.quick-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
}

.arabic-card {
    padding: 2rem;
    background: linear-gradient(135deg, hsl(270 45% 10%), hsl(270 40% 14%));
    border: 1px solid hsl(var(--primary) / 0.3);
    box-shadow: 0 8px 32px hsl(270 70% 20% / 0.4),
                inset 0 1px 0 hsl(270 100% 80% / 0.1);
}

.arabic-text {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    line-height: 2;
    direction: rtl;
    text-align: right;
    word-spacing: 0.5rem;
}

.word-hidden {
    color: hsl(0 85% 65%);
    font-weight: bold;
    text-shadow: 0 0 12px hsl(0 85% 65% / 0.5);
}

.translation-card {
    background: linear-gradient(135deg, hsl(270 40% 12% / 0.6), hsl(270 50% 10% / 0.6));
    border: 1px solid hsl(var(--secondary) / 0.2);
    backdrop-filter: blur(10px);
}

.navigation {
    display: flex;
    gap: 1rem;
}

.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid transparent;
    border-top-color: hsl(var(--primary));
    border-right-color: hsl(var(--secondary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    box-shadow: 0 0 20px hsl(var(--primary) / 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.info-section {
    margin-top: 4rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px hsl(var(--secondary) / 0.3));
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    padding: 2rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 16px;
    box-shadow: 0 8px 32px hsl(270 70% 20% / 0.3);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px hsl(270 70% 20% / 0.5);
    border-color: hsl(var(--primary) / 0.5);
}

.info-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(270 70% 45%));
    color: hsl(var(--primary-foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    box-shadow: 0 6px 20px hsl(var(--primary) / 0.5);
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-card p {
    color: hsl(var(--muted-foreground));
}

.button-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-quick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--card) / 0.6);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    border-radius: 10px;
    border: 2px solid hsl(var(--border));
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-quick:hover:not(:disabled) {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary) / 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.3);
}

.btn-quick.active {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(270 70% 45%));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 16px hsl(var(--primary) / 0.5);
}

.btn-quick:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }

    .arabic-text {
        font-size: 2rem;
    }

    .navigation {
        flex-direction: column;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}
/* Floating Home Button */
.home-btn {
  position: fixed;
  left: 24px;
  bottom: 40px;
  width: 50px;
  height: 50px;
  background: rgb(104, 2, 104);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px hsl(var(--primary) / 0.5);
}