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

:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --gray: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 1.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(79, 172, 254, 0.1) 0%, transparent 50%);
    padding-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-text h1 span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Converter Box */
.converter-card {
    padding: 2.5rem;
}

.converter-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 16px; /* Prevents auto-zoom on iOS */
    outline: none;
    transition: all 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.2);
}

.currency-select {
    padding: 0.5rem 1rem;
    background: var(--dark);
    border: none;
    border-radius: 8px;
    color: white;
    margin-left: 1rem;
    cursor: pointer;
}

.swap-btn {
    display: block;
    margin: 1rem auto;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.swap-btn:hover {
    background: var(--primary);
    transform: rotate(180deg);
}

.swap-btn:active {
    transform: scale(0.9);
}

/* Rate Table */
.rates-section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.rate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rate-item {
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s;
}

.rate-item:hover {
    transform: translateY(-10px);
}

.rate-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.currency-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.rate-values {
    display: flex;
    justify-content: space-around;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.rate-box .label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 0.3rem;
}

.rate-box .value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Profile Section */
.profile-section {
    padding: 8rem 0;
    background: linear-gradient(to bottom, transparent, rgba(79, 172, 254, 0.05));
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.profile-image {
    position: relative;
}

.profile-image img {
    width: 100%;
    border-radius: 32px;
}

.profile-image::after {
    content: '';
    position: absolute;
    inset: -20px;
    border: 2px solid var(--primary);
    border-radius: 40px;
    z-index: -1;
    opacity: 0.3;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card h5 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--gray);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-links h6 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--light);
}

.copyright {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.8s ease forwards;
}

/* Mobile Menu Toggle Styling */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Updated Responsive Queries */
@media (max-width: 992px) {
    .hero-content, .profile-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text p {
        margin: 0 auto 2.5rem;
    }
    
    .hero {
        height: auto;
        padding: 140px 0 80px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .profile-image::after {
        display: none;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--darker);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .rate-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links div {
        justify-content: center;
    }

    .hero-text h1 {
        margin-bottom: 2rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .profile-content {
        gap: 3rem;
    }

    .stat-card h5 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .logo img {
        height: 30px !important;
    }

    .rate-values {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Floating WA Button */
.wa-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wa-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #fff;
}

@media (max-width: 768px) {
    .wa-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
        font-size: 25px;
    }
}
