* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
}

.app {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Grid Background */
.grid-background {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    z-index: 0;
}

/* Navigation */
.nav {
    position: relative;
    z-index: 10;
    padding: 1.5rem;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    width: 2rem;
    height: 2rem;
    background: #fff;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo i {
    color: #000;
    width: 1.25rem;
    height: 1.25rem;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #fff;
}

.nav-button {
    background: #fff;
    color: #000;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-button:hover {
    background: #f3f4f6;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
}

.header-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.header-description {
    font-size: 1.25rem;
    color: #9ca3af;
    max-width: 32rem;
    margin: 0 auto;
}

/* Tabs */
.tabs {
    margin-bottom: 3rem;
}

.tabs-list {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid #374151;
    border-radius: 9999px;
    padding: 0.25rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-trigger {
    background: transparent;
    color: #9ca3af;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.tab-trigger.active,
.tab-trigger:hover {
    background: #fff;
    color: #000;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid #374151;
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.tool-card:hover {
    border-color: #6b7280;
    transform: scale(1.05);
}

.tool-card.selected {
    border-color: #fff;
    box-shadow: 0 25px 50px -12px rgba(255, 255, 255, 0.1);
}

.tool-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-card-icon {
    color: #60a5fa;
    width: 3rem;
    height: 3rem;
    transition: transform 0.3s;
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.1);
}

.tool-card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tool-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
}

.tool-card-badge {
    background: #374151;
    color: #9ca3af;
    border: 1px solid #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.tool-card-description {
    color: #9ca3af;
    line-height: 1.5;
}

/* Tool Interface */
.tool-interface {
    background: rgba(17, 24, 39, 0.5);
    border: 1px solid #374151;
    border-radius: 0.75rem;
    margin-top: 3rem;
}

.tool-header {
    padding: 1.5rem;
    border-bottom: 1px solid #374151;
}

.tool-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.tool-icon {
    color: #60a5fa;
    width: 2rem;
    height: 2rem;
}

.tool-content {
    padding: 2rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 0.75rem;
    color: #fff;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #60a5fa;
}

.form-textarea {
    min-height: 8rem;
    resize: vertical;
}

.form-input.monospace,
.form-textarea.monospace {
    font-family: 'Courier New', monospace;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

/* Buttons */
.btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    margin-right: 0.75rem;
    margin-bottom: 0.75rem;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    border: 1px solid #4b5563;
    color: #fff;
}

.btn-outline:hover {
    background: #374151;
}

.btn-full {
    width: 100%;
    margin-right: 0;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
}

.checkbox-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

/* Range slider */
.range-slider {
    width: 100%;
    height: 0.5rem;
    background: #374151;
    border-radius: 0.25rem;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
}

.range-slider::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Results */
.result-item {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.result-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.success-message {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Color preview */
.color-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.color-swatch {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    border: 2px solid #4b5563;
}

.color-info p {
    margin: 0;
    font-size: 0.875rem;
}

.color-info .color-value {
    font-family: 'Courier New', monospace;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .header-title {
        font-size: 2rem;
    }

    .header-description {
        font-size: 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* Hide elements */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}