
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #572773;
    --dark-green: #572773;
    --light-green: #572773;
    --accent-gold: #d4af37;
    --light-gold: #f5e8b0;
    --dark-gold: #b8941f;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #343a40;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --glow: 0 0 20px rgba(212, 175, 55, 0.3);
    --whatsapp-green: #075e54;
    --whatsapp-light-green: #128c7e;
    --whatsapp-chat-bg: #e5ddd5;
    --whatsapp-user-bubble: #dcf8c6;
    --whatsapp-other-bubble: #ffffff;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #572773;
    color: var(--dark-gray);
    line-height: 1.7;
    min-height: 100vh;
    transition: var(--transition);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(87, 39, 115, 0.8) 0%, rgba(87, 39, 115, 0.9) 100%);
    z-index: -1;
}

body.fullscreen-mode {
    padding: 0;
    background: #572773;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

body.fullscreen-mode .container {
    max-width: 100%;
    padding: 10px 15px;
    margin: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex: 1;
}

body.fullscreen-mode .header {
    padding: 10px 0;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

body.fullscreen-mode .logo-container {
    max-width: 95%;
    padding: 15px 25px;
    margin: 0 auto;
    flex-direction: row;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px);
    border: 2px solid var(--accent-gold);
    box-shadow: var(--glow);
}

body.fullscreen-mode .logo-img {
    height: 110px;
    order: 1;
}

body.fullscreen-mode .company-text {
    display: block !important;
    order: 2;
    font-size: 1.8rem !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body.fullscreen-mode .ticker-container {
    margin: 10px 0;
    border-radius: 8px;
    width: 95%;
    max-width: 1200px;
    flex-shrink: 0;
    height: 60px;
    box-shadow: var(--glow);
}

body.fullscreen-mode .currency-section {
    border-radius: 10px;
    margin: 10px 0;
    width: 95%;
    max-width: 1200px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 10px;
    box-shadow: var(--glow);
}

body.fullscreen-mode .currency-table {
    flex: 1;
    display: block;
    min-height: 0;
    height: 100%;
}

body.fullscreen-mode .currency-table table {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: table;
}

body.fullscreen-mode .currency-table tbody {
    display: table-row-group;
    height: auto;
}

body.fullscreen-mode .currency-table tbody tr {
    display: table-row;
    height: 65px !important;
    min-height: 0;
    max-height: none;
}

body.fullscreen-mode .currency-table tbody td {
    display: table-cell;
    vertical-align: middle;
    min-height: 0;
    height: auto;
    padding: 8px 6px !important;
}

body.fullscreen-mode .ticker-item {
    font-size: 1.2rem !important;
}

body.fullscreen-mode .ticker-icon {
    font-size: 1.3rem !important;
}

body.fullscreen-mode .currency-table th {
    font-size: 1.1rem !important;
    padding: 10px 8px !important;
}

body.fullscreen-mode .currency-input {
    font-size: 1.5rem !important;
    padding: 5px !important;
}

body.fullscreen-mode .currency-name {
    font-size: 1rem !important;
}

body.fullscreen-mode .currency-code {
    font-size: 1.1rem !important;
}

body.fullscreen-mode .currency-flag {
    width: 35px !important;
    height: 25px !important;
}

body.fullscreen-mode .section-title {
    font-size: 1.6rem !important;
    margin-bottom: 15px;
}

body.fullscreen-mode .company-text {
    font-size: 1.6rem !important;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

/* الهيدر والشعار - تصميم جديد مع لمعان */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    position: relative;
    transition: var(--transition);
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), var(--glow);
    border: 3px solid var(--accent-gold);
    max-width: 95%;
    /* التعديل: نفس عرض باقي الأقسام */
    width: 100%;
    transition: var(--transition);
    gap: 30px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.logo-container::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg,
            transparent 20%,
            rgba(255, 255, 255, 0.25) 50%,
            transparent 80%);
    transform: rotate(30deg);
    animation: shine 5s infinite linear;
    z-index: 0;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }

    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

.logo-img {
    height: 180px;
    max-width: 100%;
    object-fit: contain;
    order: 1;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    z-index: 1;
}

.company-text {
    font-family: 'Almarai', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark-green);
    text-align: center;
    flex: 1;
    order: 2;
    display: none;
    background: linear-gradient(45deg, var(--dark-green), var(--accent-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

@media (min-width: 1200px) {
    .company-text {
        display: block;
    }
}

/* الشريط المتحرك - تصميم جديد مع لمعان */
.ticker-container {
    background: linear-gradient(90deg,
            rgba(87, 39, 115, 0.95) 0%,
            rgba(87, 39, 115, 0.95) 50%,
            rgba(87, 39, 115, 0.95) 100%);
    color: var(--white);
    padding: 15px 0;
    margin: 25px 0;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-light), var(--glow);
    border: 2px solid var(--accent-gold);
    position: relative;
    transition: var(--transition);
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.ticker-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--light-gold),
            transparent);
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.ticker-track {
    display: flex;
    position: absolute;
    left: 100%;
    white-space: nowrap;
    height: 100%;
    align-items: center;
    will-change: transform;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    margin: 0 35px;
    font-weight: 600;
    font-size: 1.3rem;
    position: relative;
    padding: 8px 0;
    flex-shrink: 0;
    height: 100%;
    align-items: center;
    transition: var(--transition);
}

.ticker-item:hover {
    transform: scale(1.05);
}

.ticker-icon {
    color: var(--accent-gold);
    margin-left: 15px;
    font-size: 1.5rem;
    min-width: 30px;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
    transition: var(--transition);
}

.ticker-item:hover .ticker-icon {
    transform: rotate(15deg);
    color: var(--light-gold);
}

.ticker-item::after {
    content: "";
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold);
}

/* جدول العملات - تصميم جديد مع لمعان */
.currency-section {
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow), var(--glow);
    border: 2px solid var(--accent-gold);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    min-height: 500px;
    height: auto;
}

.currency-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;

    opacity: 0.2;
}

.currency-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 80px;

    opacity: 0.2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--light-green);
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), transparent);
}

.section-title {
    font-family: 'Almarai', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-green);
    position: relative;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 80px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-gold);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--light-green);
    font-weight: 600;
}

.currency-table {
    width: 100%;
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--medium-gray);
    position: relative;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.currency-table.hidden {
    display: none;
    opacity: 0;
}

.currency-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-gold),
            transparent);
}

.currency-table table {
    width: 100%;
    border-collapse: collapse;
}

.currency-table thead {
    background: linear-gradient(90deg, var(--dark-green) 0%, var(--primary-green) 100%);
    color: var(--white);
    position: relative;
}

.currency-table th {
    padding: 20px 15px;
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 0.5px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.currency-table th::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: 0.5s;
}

.currency-table th:hover::before {
    left: 100%;
}

.currency-table th:first-child {
    border-left: none;
}

.currency-table tbody tr {
    border-bottom: 1px solid var(--medium-gray);
    transition: var(--transition);
    height: 85px;
    position: relative;
}

.currency-table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.currency-table td {
    padding: 18px 15px;
    text-align: center;
    vertical-align: middle;
    position: relative;
}

.currency-name {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-gray);
    font-size: 1.2rem;
    gap: 15px;
    position: relative;
}

.currency-flag {
    width: 45px;
    height: 32px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.currency-flag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: linear-gradient(45deg, var(--accent-gold), transparent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.currency-table tbody tr:hover .currency-flag {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.currency-code {
    font-size: 1.4rem;
    color: var(--dark-green);
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.currency-input-container {
    position: relative;
}

.currency-input {
    width: 100%;
    padding: 5px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius-sm);
    font-size: 1.7rem;
    text-align: center;
    transition: var(--transition);
    background-color: var(--light-gray);
    color: var(--dark-gray);
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    position: relative;
}

.currency-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background-color: var(--white);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transform: scale(1.02);
}

.currency-input.buy {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.currency-input.buy:focus {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.currency-input.sell {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.currency-input.sell:focus {
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3);
}

.currency-input-label {
    position: absolute;
    top: -10px;
    right: 15px;
    background-color: var(--white);
    padding: 0 10px;
    font-size: 0.85rem;
    color: var(--light-green);
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* أزرار التحكم - الاحتفاظ فقط بأيقونة ملء الشاشة */
.control-panel {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(87, 39, 115, 0.7);
    padding: 6px 10px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: var(--transition);
    opacity: 0.7;
    transform: scale(0.9);
}

.control-panel:hover {
    opacity: 1;
    transform: scale(1);
    background: rgba(87, 39, 115, 0.9);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.2);
}

.control-btn-container {
    position: relative;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: none;
    font-size: 1.1rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: 0.5s;
}

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

.control-btn.fullscreen {
    background: linear-gradient(135deg, #1a5d9c 0%, #0d3d6b 100%);
}

.control-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 15px rgba(255, 255, 255, 0.2);
}

.control-btn.active {
    transform: rotate(45deg);
}

.control-btn::after {
    content: attr(data-title);
    position: absolute;
    top: -35px;
    right: 50%;
    transform: translateX(50%);
    background-color: rgba(87, 39, 115, 0.9);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 1001;
    backdrop-filter: blur(5px);
    border: 1px solid var(--accent-gold);
}

.control-btn:hover::after {
    opacity: 1;
    visibility: visible;
    top: -30px;
}

/* ===== أنماط لوحة المحادثة - تصميم واتس اب ===== */
.chat-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    z-index: 10;
    border-radius: var(--border-radius);
    padding: 20px;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.1);
}

.chat-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.05;
    z-index: -1;
}

.chat-overlay.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.chat-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chat-header {
    text-align: center;
    padding: 15px 0;
    border-radius: 15px 15px 0 0;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.chat-header h3 {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.chat-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px 10px;
    overflow-y: auto;
    max-height: calc(100% - 10px);
    width: 100%;
    position: relative;
}

/* تخصيص شريط التمرير */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(7, 94, 84, 0.3);
    border-radius: 10px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(7, 94, 84, 0.5);
}

.chat-message {
    width: 100%;
    display: flex;
    margin-bottom: 12px;
    animation: slideUp 0.3s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message-left {
    justify-content: flex-start;
}

.message-right {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message-left .message-content {
    background-color: var(--whatsapp-other-bubble);
    color: #333;
    border-bottom-right-radius: 5px;
    border-top-left-radius: 5px;
}

.message-right .message-content {
    background-color: var(--whatsapp-user-bubble);
    color: #333;
    border-bottom-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* مؤشر الكتابة */
.typing-indicator {
    display: flex;
    align-items: center;
    background-color: var(--whatsapp-other-bubble);
    padding: 12px 18px;
    border-radius: 20px;
    width: fit-content;
    margin: 10px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dots {
    display: flex;
    gap: 5px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--whatsapp-light-green);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

/* القسم النهائي */
.chat-final-section {
    text-align: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.8s ease;
    max-width: 90%;
    margin: 0 auto;
}

.company-logo-text {
    font-family: 'Almarai', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--whatsapp-green);
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.features-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.feature-item {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--whatsapp-light-green);
    padding: 8px 0;
    position: relative;
}

.feature-item::before {
    content: '✓';
    margin-left: 10px;
    color: var(--whatsapp-green);
}

.contact-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--whatsapp-green);
    direction: ltr;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(18, 140, 126, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 15px;
    margin-top: 20px;
    letter-spacing: 2px;
    border: 2px solid var(--whatsapp-light-green);
}

.chat-footer {
    text-align: center;
    color: var(--whatsapp-green);
    font-size: 0.8rem;
    padding: 15px 0 0 0;
    border-top: 1px solid rgba(7, 94, 84, 0.2);
    margin-top: 10px;
    font-weight: 600;
}

/* تأثير الكتابة حرف بحرف */
.typing-text {
    display: inline-block;
    position: relative;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: #333;
    margin-right: 2px;
    vertical-align: middle;
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* تصميم متجاوب */
@media (max-width: 1100px) {
    .logo-img {
        height: 160px;
    }

    .currency-table th,
    .currency-table td {
        padding: 16px 12px;
    }

    .currency-code {
        font-size: 1.3rem;
    }

    .ticker-item {
        font-size: 1.2rem;
        margin: 0 25px;
    }

    .company-logo-text {
        font-size: 1.9rem;
    }

    .contact-number {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 15px 0;
    }

    .logo-container {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .logo-img {
        height: 140px;
        order: 1;
    }

    .company-text {
        order: 2;
        font-size: 1.8rem;
        display: block;
        margin-top: 15px;
    }

    .currency-section {
        padding: 20px 15px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .currency-table th,
    .currency-table td {
        padding: 14px 10px;
    }

    .currency-name {
        font-size: 1.1rem;
        gap: 10px;
    }

    .currency-flag {
        width: 40px;
        height: 28px;
    }

    .currency-code {
        font-size: 1.2rem;
    }

    .currency-input {
        padding: 5px;
        font-size: 1.5rem;
    }

    .ticker-container {
        height: 60px;
    }

    .ticker-item {
        font-size: 1.1rem;
        margin: 0 20px;
    }

    .ticker-icon {
        font-size: 1.3rem;
        margin-left: 10px;
    }

    .control-panel {
        top: 10px;
        left: 10px;
        padding: 6px 8px;
        gap: 6px;
    }

    .control-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .control-btn::after {
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    .company-logo-text {
        font-size: 1.7rem;
    }

    .feature-item {
        font-size: 1.2rem;
    }

    .contact-number {
        font-size: 1.2rem;
        padding: 12px;
    }

    .chat-overlay {
        padding: 15px;
    }

    .message-content {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 1rem;
    }

    .chat-header h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 120px;
    }

    .company-text {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .currency-table {
        font-size: 0.9rem;
    }

    .currency-name {
        flex-direction: column;
        gap: 8px;
    }

    .currency-flag {
        width: 35px;
        height: 25px;
    }

    .currency-code {
        font-size: 1.1rem;
    }

    .currency-input {
        padding: 5px;
        font-size: 1.5rem;
    }

    .ticker-container {
        height: 50px;
    }

    .ticker-item {
        font-size: 1rem;
        margin: 0 15px;
    }

    .ticker-icon {
        font-size: 1.1rem;
        margin-left: 8px;
    }

    .control-panel {
        top: 8px;
        left: 8px;
        padding: 5px;
        gap: 5px;
    }

    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .company-logo-text {
        font-size: 1.5rem;
    }

    .feature-item {
        font-size: 1.1rem;
    }

    .contact-number {
        font-size: 1.1rem;
        padding: 10px;
        letter-spacing: 1px;
    }

    .chat-overlay {
        padding: 10px;
    }

    .chat-header h3 {
        font-size: 1.2rem;
    }

    .message-content {
        max-width: 90%;
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    .typing-indicator {
        padding: 10px 15px;
    }

    .chat-final-section {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .control-panel {
        border-radius: 20px;
        padding: 8px 5px;
    }

    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }

    .company-logo-text {
        font-size: 1.3rem;
    }

    .contact-number {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .chat-header h3 {
        font-size: 1.1rem;
    }

    .message-content {
        font-size: 0.9rem;
        padding: 7px 10px;
    }
}
