
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .header {
            background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
            color: white;
            padding: 30px;
            text-align: center;
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            font-weight: 300;
        }

        .header p {
            opacity: 0.9;
            font-size: 1.1em;
        }

        .form-section {
            padding: 40px;
            background: #f8f9fa;
        }

        .form-group {
            margin-bottom: 25px;
        }

        .form-row {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }

        .input-group {
            flex: 1;
            min-width: 250px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #2c3e50;
            font-size: 1.1em;
        }

        input[type="text"] {
            width: 100%;
            padding: 15px;
            border: 2px solid #e1e8ed;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: white;
        }

        input[type="text"]:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        }

        .calculate-btn {
            background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
            color: white;
            border: none;
            padding: 18px 40px;
            font-size: 18px;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            display: block;
            margin: 30px auto 0;
            box-shadow: 0 10px 20px rgba(39, 174, 96, 0.3);
        }

        .calculate-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 30px rgba(39, 174, 96, 0.4);
        }

        .calculate-btn:active {
            transform: translateY(0);
        }

        .results-section {
            padding: 40px;
            display: none;
        }

        .results-section.active {
            display: block;
        }

        .results-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .result-card {
            background: white;
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
            border-left: 4px solid #3498db;
        }

        .result-card h3 {
            color: #2c3e50;
            margin-bottom: 15px;
            font-size: 1.2em;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .result-card h3 i {
            color: #3498db;
        }

        .result-value {
            font-size: 1.4em;
            font-weight: bold;
            color: #2c3e50;
            margin: 10px 0;
        }

        .result-detail {
            color: #7f8c8d;
            font-size: 0.95em;
        }

        .binary-section {
            background: #2c3e50;
            color: white;
            padding: 25px;
            border-radius: 10px;
            margin-top: 20px;
        }

        .binary-section h3 {
            margin-bottom: 20px;
            text-align: center;
            font-size: 1.3em;
        }

        .binary-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 15px;
            padding: 15px;
            background: rgba(255,255,255,0.1);
            border-radius: 8px;
        }

        .binary-label {
            font-weight: 600;
            min-width: 120px;
        }

        .binary-value {
            font-family: 'Courier New', monospace;
            font-size: 1.1em;
            letter-spacing: 1px;
            flex: 1;
            text-align: center;
            padding: 0 10px;
        }

        .network-portion {
            color: #e74c3c;
            font-weight: bold;
        }

        .host-portion {
            color: #27ae60;
            font-weight: bold;
        }

        .error-message {
            background: #e74c3c;
            color: white;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            display: none;
        }

        .error-message.active {
            display: block;
        }

        .examples {
            background: #e8f4fd;
            padding: 20px;
            border-radius: 10px;
            margin-top: 20px;
        }

        .examples h4 {
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .example-ips {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }

        .example-btn {
            background: #3498db;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .example-btn:hover {
            background: #2980b9;
            transform: translateY(-1px);
        }

        @media (max-width: 768px) {
            .form-row {
                flex-direction: column;
            }
            
            .input-group {
                min-width: 100%;
            }
            
            .header h1 {
                font-size: 2em;
            }
            
            .results-grid {
                grid-template-columns: 1fr;
            }
            
            .binary-row {
                flex-direction: column;
                text-align: center;
                gap: 10px;
            }
        }
