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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-light: #64748b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 20px;
}

.logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Main Content */
main {
    flex: 1;
}

/* Input Section */
.input-section {
    background: var(--card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Monaco', 'Menlo', monospace;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    margin-right: 10px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background-color: #475569;
    transform: translateY(-2px);
}

/* Result Container */
.result-container {
    animation: slideInUp 0.3s ease;
}

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

.result-table-wrapper {
    background: var(--card-background);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-table-wrapper h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    margin-top: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.result-table-wrapper h3:first-child {
    margin-top: 0;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.result-table tr {
    border-bottom: 1px solid var(--border-color);
}

.result-table tr:hover {
    background-color: #f8fafc;
}

.result-table td {
    padding: 15px;
    text-align: left;
}

.result-table td:first-child {
    font-weight: 600;
    color: var(--text-color);
    width: 35%;
    background-color: #f1f5f9;
}

.result-table td:last-child {
    color: var(--text-color);
    font-family: 'Monaco', 'Menlo', monospace;
    word-break: break-all;
}



/* Error Container */
.error-container {
    background-color: #fee2e2;
    border: 2px solid var(--error-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    animation: slideInUp 0.3s ease;
}

.error-container p {
    color: #dc2626;
    font-weight: 600;
    margin: 0;
    margin-bottom: 10px;
}

.error-note {
    padding: 12px;
    background-color: #fecaca;
    border-left: 3px solid #dc2626;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #991b1b;
    margin-top: 10px;
}



/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Embed Section */
.embed-section {
    background: var(--card-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.embed-section h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.embed-section textarea {
    width: 100%;
    height: 80px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    resize: none;
}

.embed-section button {
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .input-section {
        padding: 20px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .btn-primary,
    .btn-secondary {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .info-content {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
.ip-range-list::-webkit-scrollbar {
    width: 6px;
}

.ip-range-list::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 3px;
}

.ip-range-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.ip-range-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
