body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.page-wrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    justify-content: center;
    align-items: flex-start;
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 600px;
    transition: all 0.5s ease-in-out;
    position: relative;
}

.container.moved-left {
    transform: translateX(-10%);
    flex-shrink: 0;
}

.generated-records {
    flex-basis: 60%;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

h1,
h2,
h3 {
    color: #5a67d8;
}

hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}

h3 {
    margin-top: 1.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
textarea,
button {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    font-family: inherit;
}

button#mainBtn {
    background-color: #5a67d8;
    color: #fff;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

button#mainBtn:hover {
    background-color: #434190;
}

button#mainBtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #f7fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.status-item i {
    font-size: 1.5rem;
}

.status-item.valid {
    color: #38a169;
}

.status-item.invalid {
    color: #e53e3e;
}

.status-item.neutral {
    color: #718096;
}

.status-item.warning {
    color: #dd6b20;
}

#error-box {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
    font-family: monospace;
}

/* Redesigned Record Display */
.dns-output-parsed {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.dns-pill {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-family: monospace;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid transparent;
    word-break: break-all;
}

.dns-pill.version {
    background-color: #e2e8f0;
    color: #4a5568;
}

.dns-pill.include {
    background-color: #ebf4ff;
    color: #4299e1;
    border-color: #bee3f8;
}

.dns-pill.ip {
    background-color: #f0fff4;
    color: #48bb78;
    border-color: #9ae6b4;
}

.dns-pill.all {
    background-color: #fff5f5;
    color: #c53030;
    border-color: #fc8181;
}

.dns-pill.unknown {
    background-color: #fafafa;
    color: #718096;
    border-color: #e2e8f0;
}

.dns-pill.moosend-spf {
    background-color: #5a67d8;
    color: white;
    border-color: #434190;
    font-weight: bold;
}

.dns-pill.dmarc-tag {
    background-color: #ebf8ff;
    color: #4299e1;
}

.dns-pill.dmarc-policy {
    background-color: #fefcbf;
    color: #b7791f;
}

.dns-pill.dkim-tag {
    background-color: #e6fffa;
    color: #38b2ac;
}

.record-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.record-card h3 {
    margin: 0;
    padding: 1rem 1.5rem;
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1em;
}

.record-card p.instruction {
    padding: 1rem 1.5rem 0 1.5rem;
    font-size: 0.9em;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.record-entry {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: start;
    gap: 1rem;
}

.record-label {
    font-weight: 600;
    color: #2d3748;
    padding-top: 0.5rem;
}

.record-value {
    font-family: monospace;
    background-color: #f7fafc;
    padding: 0.5rem;
    border-radius: 4px;
    word-break: break-all;
    border: 1px solid #e2e8f0;
}

.copy-btn {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 4px;
    align-self: center;
}

.copy-btn:hover {
    color: #5a67d8;
    background-color: #e2e8f0;
}

.tooltip {
    visibility: hidden;
    width: 220px;
    background-color: #2d3748;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8em;
}

.status-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.dkim-lookup-group {
    display: flex;
    gap: 0.5rem;
}

#dkimLookupBtn {
    width: auto;
    flex-shrink: 0;
    background-color: #4a5568;
}

#dkimLookupBtn:hover {
    background-color: #2d3748;
}

.dkim-result-text {
    font-size: 0.9em;
    margin-top: 0.75rem;
}

.dkim-result-text.success {
    color: #38a169;
}

.dkim-result-text.error {
    color: #e53e3e;
}

textarea#dkimValue {
    margin-top: 0.75rem;
}

#welcome-screen {
    text-align: center;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.welcome-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.welcome-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.welcome-card i {
    font-size: 2.5rem;
    color: #5a67d8;
    margin-bottom: 1rem;
}

.welcome-card p {
    color: #4a5568;
}

#status-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#switchToSetupBtn {
    background: none;
    border: none;
    color: #5a67d8;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9em;
    padding: 0.5rem;
}

#switchToSetupBtn:hover {
    text-decoration: underline;
}

.reset-btn-prominent {
    background-color: #4a5568;
    color: #fff;
    border: none;
    cursor: pointer;
    margin: 1.5rem 1.5rem 1rem 1.5rem;
    font-weight: 600;
    width: calc(100% - 3rem);
}

.reset-btn-prominent:hover {
    background-color: #2d3748;
}

/* New Tooltip Styles for Record Cards */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    top: 2px;
}

.tooltip-wrapper .fa-question-circle {
    color: #a0aec0;
    cursor: help;
}

.tooltip-wrapper .tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #2d3748;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -140px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9em;
    font-weight: normal;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}