body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f7f7f7;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#url-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 10px 15px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

#debug-controls {
    text-align: center;
    margin-bottom: 15px;
}

#iframe-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    height: 70vh; /* 70% of the viewport height */
}

#content-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Adjusted margin for better centering */
    padding: 20px;
    border: 1px solid #888;
    width: 85%; /* Slightly wider */
    max-width: 900px;
    border-radius: 8px;
    position: relative;
}

.modal-header {
    margin-bottom: 10px;
}

.modal-header h2 {
    margin: 0;
    text-align: center;
}

#copy-btn {
    display: block;
    margin: 0 auto 15px auto;
    padding: 8px 16px;
    background-color: #28a745;
    font-size: 14px;
}

#copy-btn:hover {
    background-color: #218838;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
}

/* Tab Styles */
.tab-container {
    width: 100%;
    margin-top: 15px;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #ddd;
}

.tab-button {
    padding: 10px 15px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: #555;
    border-bottom: 3px solid transparent; /* For active indicator */
    margin-bottom: -2px; /* Align with container's border */
    transition: color 0.3s, border-color 0.3s;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
}

.tab-button:hover {
    background-color: #f0f0f0;
    color: #000;
}

.tab-button.active {
    color: #007bff;
    border-bottom: 3px solid #007bff;
    font-weight: bold;
}

.tab-content {
    display: none;
    padding-top: 20px;
}

.tab-content.active {
    display: block;
}

.tab-content pre {
    background-color: #eee;
    padding: 15px;
    border-radius: 5px;
    white-space: pre-wrap;       
    word-wrap: break-word;       
    max-height: 45vh; /* Max height relative to viewport */
    overflow-y: auto;
    font-family: "Menlo", "Consolas", monospace;
    font-size: 14px;
}