:root {
    --bg-black: #000000;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.1);
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    --accent-primary: #6366f1;
    --accent-secondary: #a855f7;
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-black);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    width: 18px;
    height: 18px;
    color: white;
}

.accent {
    color: var(--accent-primary);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

/* Hero */
.hero {
    padding: 150px 20px 80px;
    text-align: center;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 20px;
}

#tool-search {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    color: white;
    outline: none;
    transition: border-color 0.3s;
}

#tool-search:focus {
    border-color: var(--accent-primary);
}

/* Tools Grid */
.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 100px;
}

.tool-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 30px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.tool-icon-box {
    width: 50px;
    height: 50px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon-box i {
    color: var(--accent-primary);
    width: 24px;
}

.tool-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tool-link {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.tool-card:hover .tool-link {
    opacity: 1;
    transform: translateX(0);
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Tool Detail */
.back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 120px;
    margin-bottom: 30px;
    font-weight: 500;
    transition: color 0.3s;
}

.back-btn:hover {
    color: white;
}

.glass-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 50px;
    border-radius: 30px;
    min-height: 400px;
}

/* Tool UI Elements */
.tool-ui-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
}

.upload-area {
    width: 100%;
    padding: 60px;
    border: 2px dashed var(--border-glass);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-area:hover {
    border-color: var(--accent-primary);
}

.upload-area i {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: #4f46e5;
}

.btn-success {
    background: #10b981;
    color: white;
}

textarea {
    width: 100%;
    height: 250px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-family: inherit;
    resize: none;
    outline: none;
}

/* Calculator */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 300px;
}

.calc-btn {
    height: 60px;
    border-radius: 15px;
    border: none;
    background: var(--bg-glass);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
}

.calc-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.calc-display {
    width: 100%;
    text-align: right;
    padding: 20px;
    font-size: 2rem;
    font-family: var(--font-display);
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-glass);
    padding: 60px 0;
    margin-top: 100px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.footer-links p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.about-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 40px;
    border-radius: 30px;
    transition: transform 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.about-card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .nav-links {
        display: none;
    }
    .footer-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
}
