@font-face {
    font-family: 'Manhaj';
    src: url('../assets/fonts/Manhaj.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'ArabicRamadan';
    src: url('../assets/fonts/ArabicRamadan-Display.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Brickell';
    src: url('../assets/fonts/Brickell.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Clausten';
    src: url('../assets/fonts/Clausten.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --navy: #15215D;
    --yellow: #F2EA4B;
    --lightblue: #42C4E7;
    --white: #FFFFFF;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-500: #6B7280;
    --gray-800: #1F2937;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    margin-bottom: 2.5rem;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--white);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.logo img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.logo svg {
    width: 32px;
    height: 32px;
    fill: var(--navy);
}

.badge {
    display: inline-block;
    background: rgba(66, 196, 231, 0.15);
    color: var(--navy);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

@media (max-width: 639px) {
    .header h1 {
        font-size: 1.35rem;
    }
    .header p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    .logo {
        width: 45px;
        height: 45px;
    }
    #btn-show-history {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* History Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.history-item {
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-item:hover {
    border-color: var(--navy);
    background: var(--gray-100);
}

.history-title {
    font-weight: bold;
    color: var(--navy);
    font-size: 1rem;
}

.history-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
    width: 100%;
}
.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 99;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}
.autocomplete-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:hover {
    background-color: var(--gray-50);
}
.autocomplete-text {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}
.autocomplete-delete {
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}
.autocomplete-delete:hover {
    background-color: #fee2e2;
}
