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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    padding: 40px;
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
    font-weight: 700;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.input-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 1.05em;
}

input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.input-hint {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.results-section {
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.5s;
}

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

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.result-card h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #555;
}

.result-value {
    color: #333;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.subnet-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.subnet-list h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.subnet-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    transition: border-color 0.3s;
}

.subnet-item:hover {
    border-color: #667eea;
}

.subnet-header {
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.subnet-detail {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.95em;
}

.subnet-detail-label {
    color: #666;
    font-weight: 600;
}

.subnet-detail-value {
    color: #333;
    font-family: 'Courier New', monospace;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .result-item,
    .subnet-detail {
        flex-direction: column;
        gap: 5px;
    }
}
/* Comparison Section Styles */
.comparison-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.comparison-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.comparison-column {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.comparison-column h4 {
    color: white;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
}

.comparison-subnet-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-size: 0.9rem;
    color: white;
    border-left: 3px solid #ffd700;
}

.comparison-subnet-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .comparison-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-section {
        padding: 1rem;
    }
}

/* Navigation Tabs Styles */
.navigation-tabs {
    display: flex;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 5px;
    gap: 5px;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tab-icon {
    font-size: 1.2em;
}

.calculator-section {
    display: none;
}

.calculator-section.active {
    display: block;
    animation: fadeIn 0.5s;
}

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

@media (max-width: 768px) {
    .navigation-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        justify-content: flex-start;
    }
}