/* Qibla Finder Page Styles */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    scroll-behavior: smooth;
    transition: all 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(1deg); }
}

/* Header */
header h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-button.small {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    margin: 0 1rem;
    border-radius: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-weight: 600;
    text-decoration: none;
    color: white;
    display: inline-block;
    min-width: 140px;
    text-align: center;
}

.nav-button.small:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.top-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    align-self: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Qibla Container */
.qibla-container {
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2rem;
}

/* Compass Section */
.compass-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.compass-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.compass {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.compass-face {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #1e3a8a, #3b82f6, #1e3a8a);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

.compass-needle {
    width: 6px;
    height: 85%;
    background: linear-gradient(to bottom, #ef4444 50%, #374151 50%);
    border-radius: 3px;
    position: relative;
    transform-origin: center;
    transition: transform 0.1s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
}

.needle-north, .needle-south {
    position: absolute;
    width: 25px;
    height: 25px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.needle-north {
    top: -12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.needle-south {
    bottom: -12px;
    background: linear-gradient(135deg, #374151, #1f2937);
}

.compass-markings {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.marking {
    position: absolute;
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.marking.n { top: 15px; left: 50%; transform: translateX(-50%); }
.marking.ne { top: 30px; right: 30px; }
.marking.e { top: 50%; right: 15px; transform: translateY(-50%); }
.marking.se { bottom: 30px; right: 30px; }
.marking.s { bottom: 15px; left: 50%; transform: translateX(-50%); }
.marking.sw { bottom: 30px; left: 30px; }
.marking.w { top: 50%; left: 15px; transform: translateY(-50%); }
.marking.nw { top: 30px; left: 30px; }

.qibla-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    border: 3px solid #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
}

.qibla-arrow {
    font-size: 28px;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.8));
}

/* Compass Info */
.compass-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
}

.info-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-card:hover::before {
    opacity: 1;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.info-card h3 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.direction-display {
    font-size: 1.8rem;
    font-weight: 800;
    color: #22c55e;
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

/* Controls Section */
.controls-section {
    text-align: center;
    margin-bottom: 3rem;
}

.control-btn {
    padding: 1.2rem 2.5rem;
    border-radius: 1.5rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.8rem;
    font-size: 1.1rem;
    backdrop-filter: blur(20px);
}

.control-btn.primary {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(22, 163, 74, 0.3));
    color: #22c55e;
    border: 2px solid #22c55e;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.control-btn.primary:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(22, 163, 74, 0.4));
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #22c55e;
}

.control-btn.primary.active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(220, 38, 38, 0.3));
    border-color: #f87171;
    color: #f87171;
}

.control-btn.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.control-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.status-message {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.status-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.status-message.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

/* Location Section */
.location-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 3rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.location-section h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
}

.location-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group label {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    font-size: 1rem;
}

.input-group input {
    padding: 1rem 1.5rem;
    border-radius: 1.2rem;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
}

.input-group input:focus {
    outline: none;
    border-color: #22c55e;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Instructions */
.instructions {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
}

.instruction-steps {
    display: grid;
    gap: 1.5rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.step:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.step p {
    margin: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

/* Footer */
footer {
    margin-top: auto;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .top-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-button.small {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: 120px;
    }
    
    .compass-wrapper {
        width: 280px;
        height: 280px;
    }
    
    .compass-info {
        grid-template-columns: 1fr;
    }
    
    .location-inputs {
        grid-template-columns: 1fr;
    }
    
    .control-btn {
        margin: 0.5rem;
        padding: 1rem 2rem;
    }
    
    .marking {
        font-size: 14px;
    }
    
    .qibla-indicator {
        width: 60px;
        height: 60px;
    }
    
    .qibla-arrow {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .compass-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .marking {
        font-size: 12px;
    }
    
    .qibla-indicator {
        width: 50px;
        height: 50px;
    }
    
    .qibla-arrow {
        font-size: 20px;
    }
    
    .direction-display {
        font-size: 1.5rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .step p {
        text-align: center;
    }
}

/* Dark mode support */
 