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

:root {
    color-scheme: light dark;
    --code-font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.input-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

#ipsInput {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    font-family: var(--code-font-family);
    font-size: 13px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.3s;
}

#ipsInput:focus {
    outline: none;
    border-color: #667eea;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.error-message {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.output-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.output-header h2 {
    font-size: 1.5rem;
    color: #667eea;
}

#reportOutput {
    font-family: var(--code-font-family);
    font-size: 13px;
    line-height: 1.5;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2d3748;
}

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

    .button-group {
        flex-direction: column;
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        color: #e0e0e0;
    }

    .input-section,
    .output-section {
        background: #1e1e1e;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    #ipsInput {
        background: #2a2a2a;
        border-color: #404040;
        color: #e0e0e0;
    }

    #ipsInput:focus {
        border-color: #667eea;
    }

    #ipsInput::placeholder {
        color: #808080;
    }

    .btn-secondary {
        background: #404040;
        color: #e0e0e0;
    }

    .btn-secondary:hover {
        background: #505050;
    }

    .error-message {
        background: #3a1616;
        border-color: #5a2020;
        color: #ff6b6b;
    }

    .output-header {
        border-bottom-color: #404040;
    }

    .output-header h2 {
        color: #8b9df7;
    }

    #reportOutput {
        background: #2a2a2a;
        color: #e0e0e0;
    }
}
