@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-base: #fbfbfd;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.04);
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --accent-blue: #0071e3;
    --accent-blue-hover: #0077ed;
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 20px 60px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

/* ======= TOP NAV ======= */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
}

.nav-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 2px;
}

/* ======= CONTAINER ======= */
.container {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 45px;
}

/* ======= HEADER ======= */
header {
    text-align: center;
    position: relative;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.highlight {
    color: var(--accent-blue);
}

header p {
    color: var(--text-muted);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: -0.2px;
}

/* ======= BACK BUTTON ======= */
.back-btn {
    position: absolute;
    left: 0;
    top: 8px;
    background: #f5f5f7;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #e8e8ed;
    transform: translateX(-2px);
}

/* ======= HOME SCREEN CARDS ======= */
.home-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.home-option-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 35px 35px;
    display: flex;
    align-items: center;
    gap: 22px;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.home-option-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
    border-color: rgba(0, 113, 227, 0.15);
}

.home-option-card:active {
    transform: translateY(-1px) scale(0.99);
}

.option-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.option-icon-red {
    background: linear-gradient(135deg, #ff3b30, #ff6259);
    color: white;
}

.option-icon-blue {
    background: linear-gradient(135deg, #0088cc, #00b2ff);
    color: white;
}

.home-option-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.home-option-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.option-arrow {
    margin-left: auto;
    font-size: 1.5rem;
    color: #c7c7cc;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.home-option-card:hover .option-arrow {
    transform: translateX(5px);
    color: var(--accent-blue);
}

/* ======= SEARCH BOX ======= */
.search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 6px 10px 6px 25px;
    width: 100%;
    max-width: 550px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: var(--shadow-medium);
    border-color: rgba(0, 113, 227, 0.3);
    transform: translateY(-2px);
}

.search-box i.ph-phone,
.search-box i.ph-telegram-logo {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1.25rem;
    padding: 12px 18px;
    font-weight: 500;
    letter-spacing: 1px;
}

.search-box input::placeholder {
    color: #c1c1c6;
    font-weight: 400;
    letter-spacing: normal;
}

.search-box button {
    background: var(--accent-blue);
    border: none;
    border-radius: 14px;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: white;
    font-size: 1.4rem;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.02);
}

.error-msg {
    color: #ff3b30;
    font-size: 0.95rem;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 500;
}

.error-msg.visible {
    opacity: 1;
}

/* ======= LOADING ======= */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
}

.spinner {
    width: 35px;
    height: 35px;
    border: 3px solid rgba(0, 0, 0, 0.05);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
}

/* ======= RESULT CARDS ======= */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.result-card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f2f2f2;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 70px;
    height: 70px;
    border-radius: 22px;
    background: #f5f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-blue);
    border: 1px solid #e5e5ea;
}

.name-block h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-main);
    letter-spacing: -0.5px;
    text-transform: capitalize;
}

.name-block p {
    color: var(--text-muted);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
}

.name-block p i { color: #8e8e93; }

.circle-badge {
    background: #f2f2f7;
    color: #1c1c1e;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #34c759;
    border-radius: 50%;
}

/* ======= INFO GRID ======= */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.info-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 0;
}

.address-card {
    grid-column: 1 / -1;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-label i {
    font-size: 1.1rem;
    color: #8e8e93;
}

.info-value {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-main);
    word-break: break-word;
    line-height: 1.5;
}

.highlight-text {
    color: var(--text-main);
    font-weight: 600;
}

/* ======= MAP SECTION ======= */
.map-container {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid #f2f2f2;
}

.address-below-map {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f2f2f2;
}

.map-header {
    margin-bottom: 15px;
}

/* ======= MAP WRAPPER ======= */
.map-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    background: #e8eaed;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
}

.tracking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.radar-circle {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(0, 113, 227, 0.8);
    border-radius: 50%;
    position: absolute;
    animation: radarPulse 1.5s infinite ease-out;
}

@keyframes radarPulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

.tracking-status {
    margin-top: 25px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-blue);
    letter-spacing: 0.5px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.real-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.real-map.map-visible {
    opacity: 1;
}

/* ======= TG RESULT CARD ======= */
.tg-result-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tg-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f2f2f2;
    margin-bottom: 25px;
}

.tg-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0088cc, #00b2ff);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.tg-header-info h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}

.tg-header-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tg-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.tg-data-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 15px 0;
}

.tg-data-item.full-width {
    grid-column: 1 / -1;
}

.tg-number-highlight {
    font-size: 1.8rem;
    font-weight: 700;
    color: #34c759;
    letter-spacing: 1.5px;
}

.tg-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8faf0;
    color: #34c759;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
}

/* ======= NO RESULTS ======= */
.no-results {
    text-align: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
}

.no-results i {
    font-size: 3.5rem;
    color: #ff3b30;
    margin-bottom: 15px;
}

.no-results h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 600;
}

.no-results p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ======= UTILITIES ======= */
.hidden {
    display: none !important;
}

/* ======= BACKGROUND BLOBS ======= */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-blue);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: #ff3b30;
    bottom: -80px;
    left: -80px;
}

/* ======= SEARCH HISTORY ======= */
.history-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f2f2f2;
    width: 100%;
    max-width: 550px;
    align-self: center;
}

.history-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-title i {
    font-size: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.history-item:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
    border-color: rgba(0, 113, 227, 0.15);
}

.history-item:active {
    transform: scale(0.98);
}

.history-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f5f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.history-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.history-number {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-time {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.history-arrow {
    font-size: 1.1rem;
    color: #c7c7cc;
    flex-shrink: 0;
}

/* ======= RESPONSIVE ======= */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .search-box { padding: 6px 8px 6px 18px; }
    .search-box input { font-size: 1.1rem; }
    .result-card, .tg-result-card { padding: 25px; border-radius: 24px; }
    .card-header { flex-direction: column; align-items: stretch; gap: 20px; padding-bottom: 20px; }
    .circle-badge { align-self: flex-start; }
    .avatar { width: 55px; height: 55px; font-size: 1.5rem; border-radius: 16px; }
    .name-block h2 { font-size: 1.6rem; }
    .home-option-card { padding: 25px; }
    .option-icon { width: 50px; height: 50px; font-size: 1.5rem; border-radius: 14px; }
    .back-btn { position: relative; margin-bottom: 15px; align-self: flex-start; }
    .tg-data-grid { grid-template-columns: 1fr; }
   .history-section { 
    max-width: 100%; 
}
}

/* ======= POWERED BY ======= */
.powered-by{
    text-align:center;
    margin-top:15px;
    font-size:14px;
    color:#8a8a8a;
    font-family:'Outfit',sans-serif;
    letter-spacing:0.5px;
}

.powered-by span{
    color:#00f7ff;
    font-weight:600;
    text-shadow:0 0 8px rgba(0,247,255,0.7);
}
}
