:root {
    --primary-color: #4361ee;
    --primary-light: #738bff;
    --primary-dark: #3a56d4;
    --secondary-color: #ff7c43;
    --secondary-light: #ff9a6c;
    --accent-color: #f72585;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --error-color: #ef476f;
    
    --text-primary: #232946;
    --text-secondary: #454c6d;
    --text-tertiary: #666d90;
    
    --bg-primary: #f8f9ff;
    --bg-secondary: #edf0ff;
    --bg-card: rgba(255, 255, 255, 0.85);
    
    --shadow-sm: 0 4px 6px rgba(67, 97, 238, 0.05);
    --shadow-md: 0 8px 24px rgba(67, 97, 238, 0.12);
    --shadow-lg: 0 12px 32px rgba(67, 97, 238, 0.18);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-family: 'Inter', system-ui, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

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

.shape-1 {
    background: var(--primary-light);
    width: 500px;
    height: 500px;
    top: -200px;
    right: -100px;
    opacity: 0.4;
    animation: float 15s ease-in-out infinite alternate;
}

.shape-2 {
    background: var(--secondary-color);
    width: 600px;
    height: 600px;
    bottom: -300px;
    left: -200px;
    opacity: 0.3;
    animation: float 20s ease-in-out infinite alternate-reverse;
}

.shape-3 {
    background: var(--accent-color);
    width: 300px;
    height: 300px;
    top: 40%;
    right: 10%;
    opacity: 0.2;
    animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(30px, 50px) rotate(10deg);
    }
}

.app-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 4rem);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.app-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.5rem;
}

.logo-icon i {
    color: white;
    font-size: 1.8rem;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.app-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-container {
    margin-bottom: 1rem;
}

.location-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.select-wrapper {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.select-wrapper label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.select-wrapper label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.select-wrapper select {
    width: 100%;
    background-color: white;
    border: 2px solid rgba(67, 97, 238, 0.15);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    color: var(--text-primary);
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

.select-wrapper select:disabled {
    background-color: rgba(237, 240, 255, 0.5);
    border-color: rgba(67, 97, 238, 0.1);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.results-container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10;
    border-radius: var(--radius-md);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(67, 97, 238, 0.2);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-message {
    background-color: rgba(239, 71, 111, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.initial-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
    height: 100%;
    gap: 1.5rem;
}

.empty-state-icon {
    font-size: 3.5rem;
    opacity: 0.25;
    margin-bottom: 1rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pharmacy-card {
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition-normal);
    border: 1px solid rgba(67, 97, 238, 0.08);
    height: 100%;
}

.pharmacy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(67, 97, 238, 0.12);
}

.pharmacy-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
    padding-bottom: 0.75rem;
}

.pharmacy-card p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.pharmacy-card p i {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 0.25rem;
    width: 1rem;
    text-align: center;
}

.pharmacy-card .address-desc {
    font-style: italic;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    padding-left: 1.75rem;
}

.pharmacy-card .duty-status {
    color: var(--accent-color);
    font-weight: 600;
}

.pharmacy-card p a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.pharmacy-card p a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.pharmacy-card .map-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(67, 97, 238, 0.1);
}

.pharmacy-card .map-links a {
    flex: 1;
    min-width: 110px;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.pharmacy-card .map-links a.google {
    background-color: #4285F4;
    color: white;
}

.pharmacy-card .map-links a.google:hover {
    background-color: #3367D6;
}

.pharmacy-card .map-links a.apple {
    background-color: #000000;
    color: white;
}

.pharmacy-card .map-links a.apple:hover {
    background-color: #333;
}

.pharmacy-card .map-links a.yandex {
    background-color: #FFCC00;
    color: #000;
}

.pharmacy-card .map-links a.yandex:hover {
    background-color: #F2C200;
}

.app-footer {
    margin-top: 2rem;
    text-align: center;
}

.footer-content {
    padding: 1.5rem;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.footer-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.copyright {
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .app-container {
        margin: 1rem auto;
        padding: 0 1rem;
    }
    
    .glass-card {
        padding: 1.5rem;
        border-radius: var(--radius-md);
    }
    
    .app-header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .location-selector {
        flex-direction: column;
        gap: 1rem;
    }
    
    .select-wrapper {
        min-width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.25rem;
    }
    
    .app-header h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-icon i {
        font-size: 1.5rem;
    }
    
    .pharmacy-card {
        padding: 1.25rem;
    }
}