body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.diagnostic-container {
    background-color: #2d2d2d;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
}

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

.section-header {
    background-color: #363636;
    padding: 12px 15px;
    margin: 20px 0 10px 0;
    border-left: 4px solid #0066cc;
    font-weight: 600;
    font-size: 1.1em;
}

.expandable-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.expandable-header:after {
    content: '\25BC';
    font-size: 10px;
    transition: transform 0.3s;
    margin-right: 10px;
}

.expandable-header.collapsed:after {
    transform: rotate(-90deg);
}

.expandable-content {
    transition: max-height 0.3s ease-out;
    max-height: 1000px;
    overflow: hidden;
}

.expandable-content.collapsed {
    max-height: 0;
}

.diagnostic-item {
    margin: 15px 0;
    padding: 10px 15px;
    border-bottom: 1px solid #404040;
}

.label {
    font-weight: 600;
    color: #e0e0e0;
    min-width: 160px;
    display: inline-block;
}

.value {
    color: #b0b0b0;
    word-break: break-all;
}

.ip-highlight {
    font-size: 1.2em;
    color: #3399ff;
    font-weight: 600;
}

.buttons {
    text-align: center;
    margin: 20px 0;
}

.btn {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 0 5px;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background-color: #0052a3;
}

.btn-start {
    background-color: #28a745;
}

.btn-start:hover {
    background-color: #218838;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.copy-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.back-link {
    display: block;
    text-align: center;
    margin-bottom: 15px;
    color: #3399ff;
    text-decoration: none;
    font-size: 1.1em;
}

.back-link:hover {
    text-decoration: underline;
}

.provider-link {
    color: #3399ff;
    text-decoration: none;
    font-weight: bold;
}

.provider-link:hover {
    text-decoration: underline;
}

.footer {
    margin-top: 30px;
    text-align: center;
    color: #888;
}

.footer-links {
    margin: 15px 0;
}

.footer-links a {
    color: #3399ff;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Stats Section Styles */
.stats-section {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-card {
    text-align: center;
    padding: 15px 25px;
    background-color: #363636;
    border-radius: 8px;
    min-width: 140px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #3399ff;
    margin-bottom: 5px;
}

.stat-label {
    color: #888;
    font-size: 14px;
}

.timestamp {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
}

.copyright {
    font-size: 0.9em;
    color: #888;
}

.ping-result {
    font-family: monospace;
    margin: 5px 0;
    padding: 5px;
    background-color: #363636;
    border-radius: 3px;
}

/* Advanced Tools Section */
.advanced-tools {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    flex-wrap: wrap;
}

.tool-section {
    text-align: center;
    flex: 1;
    min-width: 200px;
    margin-bottom: 15px;
}

.tool-section h3 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
    font-size: 1.1em;
}

.tool-section p {
    margin: 0 0 15px 0;
    color: #888;
    font-size: 0.9em;
}

.tool-section .btn {
    min-width: 140px;
}

/* Email Configuration Checker Styles */
.input-group {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

input[type="text"] {
    padding: 8px 12px;
    font-size: 16px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
    color: #fff;
    width: 300px;
}

.record-section, .mx-records {
    margin: 15px 0;
    padding: 15px;
    background-color: #363636;
    border-radius: 4px;
}

.record-header {
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* DNS Result Styles */
.dns-resolver {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.server-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.response-time {
    font-size: 0.9em;
    color: #888;
}

.resolver-info {
    color: #888;
    font-size: 0.9em;
}

.dns-record {
    font-family: monospace;
    background-color: #363636;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    word-break: break-all;
}

.status-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-success {
    background-color: #28a745;
    color: white;
}

.status-warning {
    background-color: #ffc107;
    color: black;
}

.status-error {
    background-color: #dc3545;
    color: white;
}

.record-content {
    font-family: monospace;
    word-break: break-all;
    margin: 10px 0;
    padding: 10px;
    background-color: #2d2d2d;
    border-radius: 3px;
}

.recommendation {
    margin-top: 10px;
    padding: 10px;
    background-color: #2d2d2d;
    border-radius: 3px;
    font-size: 0.9em;
}

.mx-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: monospace;
}

.mx-table th,
.mx-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #4a4a4a;
}

.mx-table th {
    font-weight: bold;
    color: #aaa;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .diagnostic-container {
        padding: 15px;
    }

    .advanced-tools {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .tool-section {
        width: 100%;
        min-width: unset;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .tool-section:not(:last-child) {
        border-bottom: 1px solid #444;
        padding-bottom: 20px;
    }

    .input-group {
        flex-direction: column;
        gap: 15px;
    }

    input[type="text"] {
        width: 100%;
        max-width: 300px;
    }

    .label {
        min-width: 120px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .diagnostic-container {
        padding: 10px;
    }

    .buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 200px;
        margin: 0;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .footer-links a {
        margin: 0;
    }

    .dns-resolver {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .resolver-info {
        align-self: flex-end;
    }
}
