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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    min-height: 100vh;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
header {
    margin-bottom: 48px;
    text-align: center;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.site-subtitle {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tool-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 233, 0.5);
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.2);
}

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

.tool-card.active {
    border-color: #0ea5e9;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #f1f5f9;
    position: relative;
    z-index: 1;
}

.tool-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.tool-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}

.tool-badge.coming-soon {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

/* Tool Content */
.tool-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tool-content.active {
    display: block;
}

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

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.back-button:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #0ea5e9;
    color: #0ea5e9;
    transform: translateX(-4px);
}

.tool-header {
    margin-bottom: 32px;
}

.tool-title {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.tool-subtitle {
    color: #94a3b8;
    font-size: 1rem;
}

/* Cards */
.work-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 968px) {
    .work-area {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.3s;
}

.card:hover {
    border-color: rgba(148, 163, 184, 0.3);
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    border-radius: 2px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 10px;
}

label input[type=checkbox] {
    margin-right: 10px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #0ea5e9;
}

input[type=text],
input[type=number],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s;
}

input[type=text]:focus,
input[type=number]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0ea5e9;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

input[type=text]:disabled,
input[type=number]:disabled,
textarea:disabled,
select:disabled {
    background: rgba(15, 23, 42, 0.3);
    color: #475569;
    cursor: not-allowed;
    border-color: rgba(148, 163, 184, 0.15);
}

textarea {
    resize: vertical;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
}

.row {
    display: flex;
    gap: 16px;
}

.row > * {
    flex: 1;
}

.dhcp-toggle {
    display: flex;
    align-items: center;
    padding: 16px;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(14, 165, 233, 0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.dhcp-toggle:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.5);
}

.dhcp-toggle input {
    margin: 0;
}

.dhcp-toggle label {
    margin: 0;
    flex: 1;
    cursor: pointer;
}

.form-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
    font-weight: 400;
}

/* Buttons */
button {
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

button.primary {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

button.secondary {
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

button.secondary:hover {
    background: rgba(30, 41, 59, 1);
    border-color: #0ea5e9;
    color: #0ea5e9;
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Output */
pre {
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
    padding: 20px;
    border-radius: 12px;
    overflow: auto;
    margin: 0;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    max-height: 500px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    line-height: 1.6;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.note {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 16px;
    line-height: 1.6;
    padding: 14px 16px;
    background: rgba(14, 165, 233, 0.1);
    border-left: 3px solid #0ea5e9;
    border-radius: 8px;
}

/* Status Messages */
.status {
    font-size: 0.85rem;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

.status.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status.info {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Footer */
footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

footer a {
    color: #0ea5e9;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #38bdf8;
}