@import url('/styles/shared.css');

/* Form */
.subnet-form {
    margin-top: 1rem;
}

.subnet-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    align-items: end;
}

.subnet-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.subnet-form input,
.subnet-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.subnet-form input:focus,
.subnet-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Results */
.result-table {
    margin-top: 2rem;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
}

.result-table h3 {
    margin: 0 0 1.25rem 0;
    font-size: 1.4rem;
    color: #1e3a8a;
}

.networks-table {
    margin-top: 2.5rem;
}

.table-container {
    margin-top: 1.25rem;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.modern-networks-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 600px;
}

.modern-networks-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: #ffffff;
}

.modern-networks-table th {
    padding: 0.9rem 1.1rem;
    font-weight: 600;
    text-align: left;
    letter-spacing: 0.3px;
}

.modern-networks-table td {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #eef2ff;
    color: #1f2937;
}

.modern-networks-table tr:nth-child(even) td {
    background: #f8fafc;
}

.modern-networks-table tr:hover td {
    background: rgba(59, 130, 246, 0.08);
}

.current-network {
    background: rgba(59, 130, 246, 0.15) !important;
}

.current-network td {
    font-weight: 600;
}

/* Description Section */
.description-section {
    margin-top: 3rem;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
    padding: 2.5rem;
}

.description-header {
    color: #1e40af;
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e7ff;
}

.description-content {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

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

.description-column h3 {
    color: #1f2937;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.description-column p,
.description-column li {
    color: #4b5563;
    line-height: 1.65;
}

.description-column ul {
    margin: 0;
    padding-left: 1.25rem;
}

.description-features h3,
.description-tips h3,
.description-examples h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border: 1px solid #e0f2fe;
    background: #f8fafc;
    border-left: 5px solid #38bdf8;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.feature-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.feature-text h4 {
    margin: 0 0 0.4rem 0;
    color: #1e40af;
    font-size: 1.1rem;
}

.feature-text p {
    margin: 0;
    color: #4b5563;
    line-height: 1.6;
}

.description-tips .tips-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tip-item {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: #fefce8;
    border-left: 5px solid #facc15;
    color: #854d0e;
}

.tip-item strong {
    color: #b45309;
}

.description-examples .examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.example-card {
    padding: 1.5rem;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.12);
}

.example-card h4 {
    margin: 0 0 0.75rem 0;
    color: #1d4ed8;
}

.example-card ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #1f2937;
}

/* Responsive */
@media (max-width: 768px) {
    .subnet-form .form-grid {
        grid-template-columns: 1fr;
    }

    .result-table {
        padding: 1.5rem;
    }

    .modern-results-table {
        width: 100%;
    }

    .modern-results-table th,
    .modern-results-table td {
        display: block;
        width: 100%;
        padding: 0.6rem 0;
    }

    .modern-results-table th {
        color: #1f2937;
        font-size: 0.9rem;
    }

    .modern-results-table td {
        font-size: 1.05rem;
        font-weight: 600;
        color: #111827;
        margin-bottom: 0.45rem;
    }

    .modern-results-table tr {
        border-bottom: 1px solid #e5e7eb;
        padding: 0.65rem 0;
    }

    .table-container {
        border-radius: 12px;
    }

    .description-section {
        padding: 2rem;
    }

    .feature-item,
    .tip-item,
    .example-card {
        border-left-width: 4px;
    }
}

@media (max-width: 576px) {
    .result-table,
    .description-section {
        padding: 1.5rem;
    }

    .result-table h3 {
        font-size: 1.2rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .modern-networks-table {
        min-width: 520px;
    }

    .modern-results-table {
        min-width: 0;
    }
}

.modern-results-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 600px;
}

.modern-results-table td {
    color: #1f2937;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
}

