/* =============================================
   WHOIS Domain Lookup - Enhanced Styles
   Based on IP Location Checker layout
   ============================================= */

/* Page structure */
.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

/* =============================================
   Content Row Sections
   ============================================= */
.content-row-1 {
    padding: 30px 0 40px;
    background-color: #ffffff;
}

.content-row-1 .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-row-2 {
    padding: 40px 0 60px;
    background-color: #f8f9fa;
}

.content-row-2 .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.full-width-wrapper {
    width: 100%;
}

/* Text title and description */
.text-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    display: block;
}

/* Info containers */
.info-container-full {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.info-container-full h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.info-container-full p,
.info-container-full li {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.info-container-full ol,
.info-container-full ul {
    margin: 0 0 15px 0;
    padding-left: 25px;
}

.info-container-full li {
    margin-bottom: 8px;
}

.info-container-full li strong {
    color: #2c3e50;
}

/* Info header with icon */
.info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.info-icon {
    font-size: 24px;
    color: #3498db;
    display: flex;
    align-items: center;
}

/* Accent bars */
.accent-bar {
    height: 4px;
    border-radius: 2px;
    margin: 15px 0 20px 0;
}

.accent-bar.tricolor-bgr {
    background: linear-gradient(to right, #3498db, #e74c3c, #f1c40f);
}

.accent-bar.green {
    background: linear-gradient(to right, #2ecc71, #27ae60);
}

.accent-bar.blue {
    background: linear-gradient(to right, #3498db, #2980b9);
}

.accent-bar.yellow {
    background: linear-gradient(to right, #f1c40f, #f39c12);
}

/* =============================================
   Mode Toggle
   ============================================= */
.mode-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}

.mode-btn {
    background-color: #e9ecef;
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn:first-child {
    border-radius: 25px 0 0 25px;
    border-right: 1px solid #dee2e6;
}

.mode-btn:last-child {
    border-radius: 0 25px 25px 0;
    border-left: 1px solid #dee2e6;
}

.mode-btn:hover {
    background-color: #dee2e6;
}

.mode-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.input-mode {
    animation: fadeIn 0.3s ease;
}

/* Upload area */
.upload-area {
    border: 2px dashed #3498db;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #2980b9;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.upload-icon {
    font-size: 55px;
    color: #3498db;
    margin-bottom: 5px;
    display: block;
}

.message-text h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

/* =============================================
   Buttons
   ============================================= */
.button-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

button, .button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* =============================================
   Progress Bar
   ============================================= */
.progress-container {
    display: none;
    margin: 20px 0;
    text-align: center;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 0.3s ease;
}

#progressText {
    color: #6c757d;
    font-size: 14px;
}

/* =============================================
   Error & Success Messages
   ============================================= */
.error {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.success {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* =============================================
   Results Styling
   ============================================= */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.result-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
    display: flex;
    align-items: center;
}

/* Domain Age Box */
.domain-age-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #d4edda 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.age-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.age-number {
    font-size: 3em;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.age-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
}

.age-details {
    font-size: 15px;
    color: #495057;
}

/* Result Grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.result-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: white;
}

.card-header.whois-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.card-header.ssl-header {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.card-header.status-header {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.card-header.hosting-header {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.card-body {
    padding: 15px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row .label {
    color: #6c757d;
    font-size: 13px;
}

.result-row .value {
    color: #2c3e50;
    font-weight: 500;
    font-size: 13px;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.value.copyable {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.value.copyable:hover {
    color: #3498db;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-tech {
    background-color: #e9ecef;
    color: #495057;
    margin-right: 5px;
    margin-bottom: 5px;
}

.badge-locked {
    background-color: #fff3cd;
    color: #856404;
}

.badge-active {
    background-color: #d4edda;
    color: #155724;
}

/* Result Sections */
.result-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.result-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    display: flex;
    align-items: center;
}

/* Nameservers Grid */
.ns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.ns-item {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
    font-family: monospace;
}

/* DNS Grid */
.dns-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dns-record {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.dns-type {
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.dns-value {
    flex: 1;
    font-size: 13px;
    color: #495057;
    word-break: break-all;
    font-family: monospace;
}

.dns-value.txt-value {
    font-size: 12px;
    color: #6c757d;
}

/* Tech Grid */
.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-label {
    color: #6c757d;
    font-size: 13px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Status Badges */
.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Raw WHOIS */
.toggle-raw-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    box-shadow: none;
}

.toggle-raw-btn:hover {
    background: #e9ecef;
    transform: none;
    box-shadow: none;
}

.raw-whois {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Share Button */
.share-btn-small {
    background-color: #ffffff;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.share-btn-small:hover {
    background-color: #3498db;
    color: white;
    transform: none;
    box-shadow: 0 2px 5px rgba(52, 152, 219, 0.3);
}

.share-btn-small.copied {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

/* =============================================
   Export Buttons
   ============================================= */
.export-buttons {
    display: none;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
}

.export-json {
    background-color: #6c757d;
}

.export-json:hover {
    background-color: #5a6268;
}

.export-csv {
    background-color: #28a745;
}

.export-csv:hover {
    background-color: #218838;
}

/* =============================================
   Bulk Results Table
   ============================================= */
.bulk-results-container {
    text-align: left;
}

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

.bulk-header h3 {
    margin: 0;
    color: #2c3e50;
}

.bulk-count {
    background-color: #3498db;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

.bulk-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.bulk-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bulk-results-table th {
    background-color: #f8f9fa;
    color: #495057;
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.bulk-results-table td {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.bulk-results-table tr:hover {
    background-color: #f8f9fa;
}

.bulk-results-table tr.result-error {
    background-color: #fff5f5;
}

.error-cell {
    color: #e74c3c;
    font-style: italic;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.online {
    background-color: #2ecc71;
}

.status-dot.offline {
    background-color: #e74c3c;
}

.ssl-valid {
    color: #27ae60;
}

.ssl-warning {
    color: #f39c12;
}

.ssl-none {
    color: #e74c3c;
}

/* =============================================
   Recommendations Section
   ============================================= */
.conversion-recommendations {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 12px;
    padding: 24px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.recommendations-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recommendations-icon {
    font-size: 20px;
}

.recommendations-text {
    font-size: 15px;
    color: #6c757d;
    font-weight: 500;
}

.tool-link {
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tool-link.compress {
    background: #81DCA1;
    color: #2d5a3d;
}

.tool-link.compress:hover {
    background: #6bc788;
}

.tool-link.webp {
    background: #ff9800;
    color: #5d3600;
}

.tool-link.webp:hover {
    background: #e68900;
}

.tool-link.avif {
    background: #B8DFFF;
    color: #1a4480;
}

.tool-link.avif:hover {
    background: #9fd1ff;
}

/* =============================================
   FAQ Section
   ============================================= */
.faq-section {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.faq-question:hover {
    background: #eef2f7;
}

.faq-item.active .faq-question {
    background: #3498db;
    color: white;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    background: #ffffff;
    transition: all 0.3s ease;
    color: #64748b;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

.faq-toggle {
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.3s ease;
    color: #3498db;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: white;
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Responsive Design
   ============================================= */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-age-box {
        flex-direction: column;
        text-align: center;
    }
    
    .button-group {
        flex-direction: column;
        align-items: center;
    }
    
    .button-group button {
        width: 100%;
        max-width: 300px;
    }
    
    .export-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .export-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .mode-toggle {
        width: 100%;
    }
    
    .mode-btn {
        flex: 1;
        padding: 12px 15px;
    }
    
    .ns-grid {
        grid-template-columns: 1fr;
    }
    
    .tech-grid {
        flex-direction: column;
    }
    
    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-row .value {
        text-align: left;
        max-width: 100%;
    }
    
    .bulk-results-table {
        font-size: 11px;
    }
    
    .bulk-results-table th,
    .bulk-results-table td {
        padding: 8px 6px;
    }
    
    .bulk-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .result-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .age-number {
        font-size: 2.5em;
    }
}

/* =============================================
   Input Styling
   ============================================= */
#domainInput, #bulkInput {
    transition: all 0.3s ease;
}

#domainInput:focus, #bulkInput:focus {
    outline: none;
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* =============================================
   Accessibility
   ============================================= */
.faq-question:focus-visible,
.mode-btn:focus-visible,
button:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =============================================
   Print Styles
   ============================================= */
@media print {
    .mode-toggle,
    .button-group,
    .export-buttons,
    .share-btn-small,
    .toggle-raw-btn {
        display: none !important;
    }
    
    .success {
        box-shadow: none;
        border: 1px solid #000;
    }
}
