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

:root {
    --primary-color: #00d4ff;
    --secondary-color: #ff006e;
    --tertiary-color: #8338ec;
    --dark-bg: #0a0e27;
    --dark-card: #1a1f3a;
    --dark-border: #2d3561;
    --light-bg: #f5f5f5;
    --light-card: #ffffff;
    --light-border: #e0e0e0;
    --text-dark: #ffffff;
    --text-light: #a0a0a0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-mode {
    --dark-bg: #f5f5f5;
    --dark-card: #ffffff;
    --dark-border: #e0e0e0;
    --text-dark: #1a1f3a;
    --text-light: #666666;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0f1535 100%);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-attachment: fixed;
}

/* Navbar Styles */
.navbar {
    background: rgba(10, 14, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
}

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

.nav-center {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: rgba(45, 53, 97, 0.5);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

.theme-toggle {
    padding: 0.8rem 1.2rem;
    background: rgba(45, 53, 97, 0.5);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 2rem;
    text-align: center;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animated-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #00d4ff, #8338ec);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ff006e, #8338ec);
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #00d4ff, #ff006e);
    top: 50%;
    right: 10%;
    animation-delay: 4s;
}

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

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #00d4ff, #ff006e, #8338ec);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-search-container {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.hero-search {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(45, 53, 97, 0.5);
    border: 2px solid var(--dark-border);
    border-radius: 12px;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.hero-search:focus {
    outline: none;
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.hero-search-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #00d4ff, #8338ec);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.hero-search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
}

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

/* Categories Section */
.categories {
    padding: 3rem 2rem;
    background: rgba(10, 14, 39, 0.5);
    position: relative;
    z-index: 5;
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.8rem 1.8rem;
    background: rgba(45, 53, 97, 0.5);
    border: 2px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.category-tab:hover {
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Tools Section */
.tools-section {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.tools-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tool-card {
    background: rgba(26, 31, 58, 0.6);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    group: card;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: var(--transition);
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tool-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tool-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.tool-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: rgba(26, 31, 58, 0.95);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dark-border);
    padding-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #ff006e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-body {
    color: var(--text-dark);
}

/* Tool Input/Output Styles */
.tool-input {
    width: 100%;
    padding: 1rem;
    background: rgba(45, 53, 97, 0.5);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    color: var(--text-dark);
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: var(--transition);
}

.tool-input:focus {
    outline: none;
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.tool-output {
    background: rgba(45, 53, 97, 0.3);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: var(--text-light);
    word-break: break-all;
    font-family: 'Inter', monospace;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    flex: 1;
    min-width: 120px;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #8338ec);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.btn-secondary {
    background: rgba(45, 53, 97, 0.5);
    color: var(--text-dark);
    border: 1px solid var(--dark-border);
}

.btn-secondary:hover {
    background: rgba(45, 53, 97, 0.8);
    border-color: var(--primary-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #00d4ff, #8338ec);
    color: white;
    padding: 1.2rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(100px);
    transition: var(--transition);
    z-index: 2000;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(45, 53, 97, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #8338ec);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8338ec, #00d4ff);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        gap: 1rem;
        padding: 0 1rem;
    }

    .nav-center {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-search-container {
        flex-direction: column;
    }

    .tools-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .categories-container {
        gap: 0.5rem;
    }

    .category-tab {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
    }

    .tool-icon {
        font-size: 2rem;
    }

    .tool-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .tools-container {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }
}