

/* Modern Color Scheme - Light Mode */
:root {
    --primary: #20919a;          /* Indigo-600 */
    --primary-light: #82cece;    /* Indigo-500 */
    --primary-dark: #0097A7;     /* Indigo-700 */
    --background: #F9FAFB;       /* Gray-50 */
    --card: #FFFFFF;             /* White */
    --text-primary: #111827;     /* Gray-900 */
    --text-secondary: #6B7280;   /* Gray-500 */
    --gray-light: #E5E7EB;       /* Gray-200 */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --success: #10B981;          /* Emerald-500 */
    --warning: #F59E0B;          /* Amber-500 */
    --danger: #EF4444;           /* Red-500 */
    --info: #3B82F6;             /* Blue-500 */
    --select: #e0e0e0;
}

/* Modern Dark Mode with Sophisticated Grays */
[data-theme="dark"] {
    --primary: #212121;
    --primary-light: #000;
    --primary-dark: #0097A7;
    --background: #181818;
    --card: #303030;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --gray-light: #3f3f3f;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.25), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --success: #34D399;         /* Emerald-400 */
    --warning: #FBBF24;         /* Amber-400 */
    --danger: #F87171;          /* Red-400 */
    --info: #60A5FA;            /* Blue-400 */
    --select: #696969;
}
@font-face {
    font-family: 'Vazir';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/vazir-font/30.1.0/Vazir-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: normal;
}
/* Chrome, Edge, Safari */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-feature-settings: "ss01";
    -moz-font-feature-settings: "ss01";
    -webkit-font-feature-settings: "ss01";
    font-family: 'Vazir', system-ui;
}

@counter-style persian-numbers {
    system: numeric;
    symbols: "۰" "۱" "۲" "۳" "۴" "۵" "۶" "۷" "۸" "۹";
}
body {
    background-color: var(--background);
    color: var(--text-primary);
    direction: rtl;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top Navigation */
.top-nav {
    background-color: var(--primary);
    padding: 1rem 2rem;
    color: white;
    position: relative;
    box-shadow: var(--shadow);
    transition: background-color 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    opacity: 1;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
    left: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 1rem;
    z-index: 1001;
    position: relative;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 2px 0;
    transition: 0.3s;
    position: relative;
}

.menu-toggle active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Side Menu */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: var(--card);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    right: 0;
}

.side-menu-close {
    margin-top: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    color: var(--text-primary);
    z-index: 2;
    align-self: flex-start;
    padding: 0.5rem 1rem;
}

.side-menu-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-light);
    margin-bottom: 2rem;
    position: relative;
}

.side-menu-header h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: normal;
}

.side-menu-content {
    padding: 0;
    margin-top: auto;
    margin-bottom: 2rem;
}

.side-menu .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    background-color: var(--card);
}

.side-menu .nav-menu a {
    color: var(--text-primary);
    padding: 1rem 2rem;
    display: block;
    text-decoration: none;
    border: none;
    font-size: 1rem;
    background-color: var(--card);
    transition: background-color 0.3s ease;
}

.side-menu .nav-menu a:hover {
    background-color: var(--primary-light);
    color: white;
}

/* Hero Section */
.hero {
    background: var(--primary);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%); */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
    opacity: 0.9;
    margin-bottom: 2rem;
    position: relative;
    font-size: 1.1rem;
}

/* Search Section */
.search-container {
    max-width: 800px;
    margin: -2rem auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

.search-box {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.search-box:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.search-input {
    width: 100%;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    overflow: hidden;
    background-color: var(--card);
}

.search-input input{
    flex: 1 1;
    padding: 1rem 1rem;
    font-size: 1rem;
    border: none;
    outline: none;
    line-height: 1.5;
    background: var(--card);
    color: var(--text-primary);
}

.search-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.search-button{
    color: var(--text-secondary);
    display: flex;
    padding-left: 15px;
    background: none;
    outline: none;
    border: none;
    align-items: center;
    margin-top: 6px;
    transition: color 0.3s ease;
}

.search-button:hover{
    color: var(--primary);
}


.keyboard-button{
    color: var(--text-secondary);
    display: flex;
    padding-right: 15px;
    background: none;
    outline: none;
    border: none;
    align-items: center;
    transition: color 0.3s ease;
}

.keyboard-button:hover{
    color: var(--primary);
}

.icon-search, .icon-keyboard{
    font-style: normal;
    font-size: 24px;
}
.icon-search:before{
    content: "";
    font-family:icons;
}
.search-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: left;
    align-items: center;
    justify-content: left;
    display: flex;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--card);
    border-radius: 0 0 12px 12px;
    box-shadow: var(--shadow);
    margin-top: -10px;
    padding: 0.5rem 0;
    display: none;
    z-index: 100;
    border: 1px solid var(--gray-light);
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: var(--primary-light);
    color: white;
}

.suggestion-item:hover .suggestion-text,
.suggestion-item:hover .suggestion-type {
    color: white;
}

.suggestion-text {
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.suggestion-type {
    color: var(--text-secondary);
    font-size: 0.8rem;
    background: var(--gray-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

/* Main Content */
.main-content {
    max-width: 770px;
    margin: 2rem auto;
    padding: 0 1rem;
    /* display: grid; */
}

/* Word Cards */
.word-cards {
    background: var(--card);
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.word-cards:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.word-card {
    padding: 2rem;
}

.word-title {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.word-type {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.word-meaning {
    color: var(--text-primary);
    line-height: 1.8;
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.word-meaning.collapsed {
    max-height: 3.6em;
}

.word-meaning.expanded {
    max-height: 1000px;
}

.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, var(--card));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.expanded .fade-overlay {
    opacity: 0;
}

.expand-button {
    background: none;
    border: none;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

/* .expand-button:hover {
    color: var(--primary-dark);
} */

.expand-button i {
    transition: transform 0.3s ease;
}

.expanded .expand-button i {
    transform: rotate(180deg);
}

/* Related Words */
.related-words {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--gray-light);
}

.related-words h2 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 0.8rem;
}

.related-list a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
    position: relative;
    padding-bottom: 2px;
}

.related-list a:hover {
    color: var(--primary-dark);
}

.related-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.related-list a:hover::after {
    width: 100%;
    left: 0;
}

@font-face {
    font-family:icons;
    src:url(icons.woff2) format("woff2");
    font-display:swap
}

.footer {
    background-color: var(--primary);
    color: white;
    padding: 40px 0 0;
    direction: rtl;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    justify-content: space-between;
    padding: 0 20px;
    grid-template-columns: 1.15fr 0.6fr 1fr 1fr;
}

/* Column styles */
.footer-column {
    flex: 1;
    padding: 0 15px;
}

.footer-column h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    font-weight: 500;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: rgba(255,255,255,0.3);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 2px 0;
}

.footer-column ul li a:hover {
    color: white;
    transform: translateX(-5px);
}

/* Description text */
.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

/* Copyright section */
.footer-bottom {
    text-align: center;
    padding: 30px 0;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Dictionary Selector */
.dictionary-selector {
    margin-top: 0.5rem;
    text-align: right;
}

.dictionary-button {
    background-color: var(--gray-light);
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    padding: 0.3rem 0.8rem;
    margin-right: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.dictionary-button:hover {
    background-color: var(--primary-light);
    /* color: white; */
    border-color: var(--primary-light);
}

.dictionary-button i {
    font-size: 20px;
    align-self: center;
    width: 20px;
    height: 20px;
    font-style: normal;
    display: inline-flex;
    align-items: center;
}

.icon-list:before {
    font-family:icons;
    content: "";
}

.icon-close:before {
    font-family:icons;
    content: "";
}

.dictionary-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: none;
    z-index: 1000;
    border: 1px solid var(--gray-light);
    overflow-y: auto;
}

.dictionary-menu.active {
    display: block;
}

.dictionary-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.dictionary-group {
    margin-bottom: 1rem;
}

.dictionary-group h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.dictionary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.dictionary-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.dictionary-item label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.dictionary-item:hover label {
    color: var(--primary);
}

/* Divider */
.text-line {
    position: relative;
    font-size: 16px;
    direction: rtl;
    color: var(--text-secondary);
    margin: 20px 0;
}

.text-line::before,
.text-line::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    border-top: 1px solid var(--gray-light);
}

.text-line::before {
    right: 0;
}

.text-line::after {
    left: 0;
}

.text-line span {
    background-color: var(--card);
    padding-right: 10px;
    position: relative;
    z-index: 1;
    margin-right: 10px;
    padding-left: 10px;
}

.line-break {
    display: flex;
    align-items: center;
    font-size: 16px;
    direction: rtl;
    text-align: right;
    color: var(--text-primary);
    margin: 30px 0;
}

.line-break::before,
.line-break::after {
    content: "";
    flex-grow: 1;
    border-top: 2px solid var(--gray-light);
    margin: 0 10px;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: auto;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    opacity: 0.9;
}

.theme-toggle i {
    font-size: 1.2rem;
}

/* Style for auto-collapsed text */
.auto-collapsible {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.auto-collapsible.collapsed {
    max-height: 6em;
}

.auto-collapsible.expanded {
    max-height: 100%;
}

.auto-collapsible .fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, var(--card));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.auto-collapsible.expanded .fade-overlay {
    opacity: 0;
}
.suggestion-item.selected {
    background-color: var(--select);
    cursor: pointer;
}

.landing {
    background-color: var(--primary);
}
.landing-hide {
    display: none;
}

/* Make clicks pass-through */
#nprogress {
    pointer-events: none;
    }

    #nprogress .bar {
    background: var(--gray-light);

    position: fixed;
    z-index: 1031;
    top: 0;
    left: 0;

    width: 100%;
    height: 4px;
    }

    /* Fancy blur effect */
    #nprogress .peg {
    display: block;
    position: absolute;
    right: 0px;
    width: 100px;
    height: 100%;
    box-shadow: 0 0 10px var(--gray-light), 0 0 5px var(--gray-light);
    opacity: 1.0;

    -webkit-transform: rotate(3deg) translate(0px, -4px);
        -ms-transform: rotate(3deg) translate(0px, -4px);
            transform: rotate(3deg) translate(0px, -4px);
    }

    /* Remove these to get rid of the spinner */
    #nprogress .spinner {
    display: block;
    position: fixed;
    z-index: 1031;
    top: 15px;
    right: 15px;
    }

    #nprogress .spinner-icon {
    width: 18px;
    height: 18px;
    box-sizing: border-box;

    border: solid 2px transparent;
    border-top-color: var(--gray-light);
    border-left-color: var(--gray-light);
    border-radius: 50%;

    -webkit-animation: nprogress-spinner 400ms linear infinite;
            animation: nprogress-spinner 400ms linear infinite;
    }

    .nprogress-custom-parent {
    overflow: hidden;
    position: relative;
    }

    .nprogress-custom-parent #nprogress .spinner,
    .nprogress-custom-parent #nprogress .bar {
    position: absolute;
    }

    @-webkit-keyframes nprogress-spinner {
    0%   { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
    }
    @keyframes nprogress-spinner {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 404 Content */
.error-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-content {
    text-align: center;
    max-width: 650px;
}


@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.error-number {
    font-size: 8rem;
    font-weight: bold;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.poets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.poet-card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.poet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.poet-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.poet-info {
    flex: 1;
}

.poet-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.poet-books {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.poet-books i {
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    display: none;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.profile-header {
    background: var(--primary);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 5px solid var(--gray-light);
}

.profile-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.profile-sub {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.bio-section {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-light);
}

.section-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
}

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-dark);
    display: inline-block;
}

.section-title i {
    color: var(--primary-dark);
}

.bio-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.about-text {
    color: var(--text-secondary);
    line-height: 2;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Books List */
.books-section {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-light);
}

.book-item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.book-item:last-child {
    border-bottom: none;
}

.book-item:hover {
    background-color: var(--background);
    border-radius: 8px;
    padding-right: 2rem;
}

.book-content {
    flex: 1;
}

.book-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.book-item:hover .book-arrow {
    transform: translateX(-5px);
    color: var(--primary);
}

.book-name {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.book-icon {
    color: var(--text-secondary);
}

.book-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Breadcrumb */
.breadcrumb {
    max-width: 900px;
    margin: 2rem auto 0;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.poem-header a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

/* Book Header */
.book-header {
    background: var(--card);
    padding: 2rem;
    margin: 2rem 0;
    max-width: 770px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
}

.book-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.book-icon-large {
    font-size: 4rem;
    color: var(--primary-dark);
    background: var(--background);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.book-info-header {
    flex: 1;
}

.book-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.book-author {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.book-stats {
    display: flex;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.stat i {
    color: var(--primary-dark);
}

/* Parts List */
.parts-section {
    background: var(--card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    overflow: hidden;
}

.parts-header {
    /* background: var(--gray-light); */
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.parts-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parts-count {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.parts-list {
    padding: 1rem 0;
}

.part-item {
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.part-item:last-child {
    border-bottom: none;
}

.part-item:hover {
    background-color: var(--background);
    padding-right: 2.5rem;
}

.part-number {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.part-content {
    flex: 1;
}

.part-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.part-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.part-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.part-item:hover .part-arrow {
    transform: translateX(-5px);
    color: var(--primary);
}

/* Poem Cards */
.poem-card {
    background: var(--card);
    color: var(--text-primary);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    padding: 2rem;
}

.poem-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.poem-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.poem-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 500;
}

.poet-name {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.poet-name i {
    color: var(--primary-dark);
}

.poem-verses {
    line-height: 2.5;
    font-size: 1.1rem;
}

.verse {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

/* .verse:hover {
    background-color: var(--gray-light);
} */

.mesra {
    flex: 1;
    text-align: center;
}

.mesra:first-child {
    text-align: right;
    padding-right: 1rem;
}

.mesra:last-child {
    text-align: left;
    padding-left: 1rem;
}

/* Single verse style for Hafez/Saadi ghazals */
.verse.single-line {
    justify-content: right;
}

.verse.single-line .mesra {
    text-align: right;
}

/* Statistics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-box {
    background: var(--background);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--gray-light);
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-dark);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.8rem;
}

.stat-number {
    direction: ltr;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
    padding: 2rem;
    background: var(--background);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    border: 4px solid var(--gray-light);
}

.member-name {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.member-role {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-dark);
}

/* Donation Box */
.donation-box {
    background: linear-gradient(135deg, var(--primary));
    padding: 3rem;
    border-radius: 12px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.donation-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.donation-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.donation-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.donation-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.donation-method {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.donation-method i {
    font-size: 1.5rem;
}

.method-info {
    flex: 1;
    text-align: right;
}

.method-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.method-value {
    font-size: 1.1rem;
    font-weight: 500;
}

.donate-button {
    background: white;
    color: var(--primary);
    padding: 1rem 3rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.donate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.donation-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    opacity: 0.9;
}

.form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}


.amount-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.amount-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.2);
}

.amount-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.amount-hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.quick-amount-btn {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.quick-amount-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

.quick-amount-btn.active {
    background: white;
    color: var(--primary);
    border-color: white;
}

/* Acknowledgment */
.acknowledgment-list {
    margin-top: 2rem;
}

.ack-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border-right: 4px solid var(--primary-dark);
    transition: all 0.3s ease;
}

.ack-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.ack-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.ack-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.ack-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.ack-description {
    color: var(--text-secondary);
    line-height: 1.6;
    padding-right: 66px;
}

/* Mission & Vision */
.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.mission, .vision {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    border-right: 4px solid var(--primary);
}

.mission h3, .vision h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mission h3 i, .vision h3 i {
    color: var(--primary);
}

.mission p, .vision p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-dark);
}

.contact-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.search-mode-toggle {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    border-radius: 8px;
}

.mode-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: 6px;
    background: var(--card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.mode-btn:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.mode-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.mode-btn.active:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}


.mode-btn i {
    font-size: 1rem;
}

.failed-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.failed-content {
    background: var(--card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.failed-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shake 0.5s ease-out;
    position: relative;
}

.failed-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 3px solid var(--danger);
    border-radius: 50%;
    opacity: 0.3;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

.failed-icon {
    font-size: 4rem;
    color: white;
    animation: xmark 0.5s ease-in-out 0.3s both;
}

@keyframes xmark {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.failed-title {
    font-size: 2rem;
    color: var(--danger);
    margin-bottom: 1rem;
    font-weight: bold;
}

.failed-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.error-details {
    background: var(--danger-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-right: 4px solid var(--danger);
}

.error-details h3 {
    color: var(--danger);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.error-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.reasons-list {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: right;
}

.reasons-list h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reasons-list h3 i {
    color: var(--primary-dark);
}

.reasons-list ul {
    list-style: none;
    padding: 0;
}

.reasons-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: start;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.reasons-list li:last-child {
    border-bottom: none;
}

.reasons-list li i {
    color: var(--danger);
    margin-top: 0.2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    flex: 1;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: var(--background);
    color: var(--text-primary);
    border: 2px solid var(--gray-light);
}

.btn-secondary:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.support-box {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    text-align: center;
}

.support-box h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.support-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.support-contacts {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.support-contact {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.success-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.success-content {
    background: var(--card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.success-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease-out;
    position: relative;
}

.success-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 3px solid var(--success);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s ease-out infinite;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.success-icon {
    font-size: 4rem;
    color: white;
    animation: checkmark 0.8s ease-in-out 0.3s both;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.success-title {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 1rem;
    font-weight: bold;
}

.success-message {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.transaction-details {
    background: var(--background);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: right;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
}

.amount-highlight {
    font-size: 1.3rem;
    color: var(--success);
    font-weight: bold;
}

.thank-you-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    padding: 2rem;
    border-radius: 12px;
    color: white;
    margin-top: 2rem;
}

.thank-you-box h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.thank-you-box p {
    opacity: 0.9;
    line-height: 1.6;
}


/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 50px;
        right: 0;
        left: 0;
        background-color: var(--primary);
        flex-direction: column;
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 0.8rem 2rem;
        display: block;
    }

    .main-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content{
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .search-container {
        padding: 0 1rem;
    }
    
    .footer-content {
        flex-direction: column;
    }

    .footer-column {
        margin-bottom: 30px;
        text-align: right;
    }
    
    .dictionary-columns {
        grid-template-columns: 1fr;
    }

    .verse {
        flex-direction: column;
    }

    .mesra:first-child,
    .mesra:last-child {
        text-align: center;
        padding: 0.25rem;
    }

    .main-content {
        padding: 0 1rem;
    }

    .section-card {
        padding: 1.5rem;
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .donation-box {
        padding: 2rem 1.5rem;
    }

    .mode-btn span {
        font-size: 0.85rem;
    }
    
    .mode-btn {
        padding: 0.7rem 0.8rem;
    }

    .failed-content {
        padding: 2rem 1.5rem;
    }

    .failed-title {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .support-contacts {
        flex-direction: column;
    }

    .success-content {
        padding: 2rem 1.5rem;
    }

    .success-title {
        font-size: 1.5rem;
    }
}

/* =========================================
   AI Analysis Card Styles
   ========================================= */

.ai-analysis-card {
    position: relative;
    overflow: hidden;
}


.ai-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
    padding-bottom: 1.5rem;
}

.ai-icon {
    color: var(--warning);
    margin-left: 0.5rem;
}

.ai-badge {
    font-size: 0.75rem;
    background: rgba(32, 145, 154, 0.1);
    color: var(--primary-dark);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    vertical-align: middle;
    margin-right: 0.5rem;
    border: 1px solid var(--primary-dark);
}

[data-theme="dark"] .ai-badge {
    background: rgba(0, 151, 167, 0.2);
}

.analysis-section {
    margin-bottom: 2.5rem;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section .section-title {
    font-size: 1.2rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analysis-section .section-title i {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.concept-text {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-light);
}

.concept-text p {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 1rem;
    text-align: justify;
}

.concept-text p:last-child {
    margin-bottom: 0;
}

/* Verse by Verse Layout */
.verses-analysis-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.verse-analysis-item {
    background: var(--background);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.verse-analysis-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.verse-original {
    background: var(--card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    border: 1px dashed var(--gray-light);
    color: var(--text-primary);
    font-weight: 500;
}

.verse-original.single-line {
    justify-content: right;
}
.verse-original.single-line .mesra {
    text-align: right;
}

.verse-prose {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.prose-icon {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-top: 0.3rem;
}

.verse-note {
    display: flex;
    gap: 0.8rem;
    background: var(--card);
    padding: 1rem;
    border-radius: 8px;
    border-right: 4px solid var(--info);
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.note-icon {
    color: var(--info);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}

/* Literary Devices Grid */
.literary-devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.device-card {
    background: var(--background);
    border: 1px solid var(--gray-light);
    border-radius: 10px;
    padding: 1.2rem;
    transition: all 0.3s ease;
}

.device-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed var(--gray-light);
}

.device-type {
    font-weight: 700;
    color: var(--primary-dark);
}

.device-target {
    background: var(--card);
    color: var(--text-secondary);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid var(--gray-light);
}

.device-explanation {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: justify;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .verse-original {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .verse-original .mesra {
        padding: 0;
    }
}