:root {
    --primary-color: #0073aa;
    --primary-dark: #005a87;
    --secondary-color: #f0f5f9;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --error-bg: #fff1f1;
    --error-border: #ffb3b3;
    --error-text: #cc0000;
    --warning-bg: #fff8e1;
    --warning-border: #ffd54f;
    --warning-text: #9a6c00;
    --success-bg: #f0fff4;
    --success-border: #68d391;
    --success-text: #22543d;
    --radius: 12px;
    --spacing: 20px;
    --mobile-spacing: 15px;
}

.whois-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--spacing);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Стили для формы */
.search-form-container {
    background: var(--secondary-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: var(--spacing);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.input-group {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text-color);
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.search-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 56px;
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

.search-button:active {
    transform: translateY(0);
}

/* Стили для дополнительных кнопок */
.additional-links {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.additional-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(0, 115, 170, 0.08);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(0, 115, 170, 0.2);
}

.additional-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

/* Стили для контейнера с кнопками */
.actions-container {
    display: none;
    margin-bottom: 20px;
    text-align: right;
    animation: fadeIn 0.3s ease;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.actions-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.copy-button, .pdf-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.copy-button:hover, .pdf-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.copy-button.copied {
    background: #38a169;
}

.copy-message {
    display: none;
    margin-left: 10px;
    color: #38a169;
    font-size: 14px;
    font-weight: 500;
}

/* Стили для модального окна */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.search-modal {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-modal h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.5em;
    font-weight: 600;
}

.search-timer {
    font-size: 3em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 20px 0;
    font-family: monospace;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 25px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 0%;
    transition: width 1s linear;
    border-radius: 4px;
}

/* Стили для результатов */
.results-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--spacing);
    min-height: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.empty-state {
    color: var(--text-light);
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    line-height: 1.6;
}

.whois-results h3 {
    color: var(--text-color);
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 0;
}

.whois-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 600px;
}

.whois-table tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.whois-table tr:last-child {
    border-bottom: none;
}

.whois-table tr.even {
    background-color: #fafafa;
}

.whois-table tr.odd {
    background-color: white;
}

.whois-table tr:hover {
    background-color: var(--secondary-color);
}

.whois-table td {
    padding: 18px 20px;
    vertical-align: top;
    font-size: 15px;
    line-height: 1.5;
}

.whois-table .key {
    width: 35%;
    font-weight: 600;
    color: var(--text-color);
    border-right: 1px solid var(--border-color);
    background-color: #f8f9fa;
}

.whois-table .value {
    width: 65%;
    color: var(--text-color);
    word-break: break-word;
}

.update-row {
    text-align: center;
    padding: 10px 15px;
    font-size: 13px;
}

.error-message {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.warning-message {
    background: var(--warning-bg);
    border: 1px solid var(--warning-border);
    color: var(--warning-text);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

/* Тултип для уведомлений */
.input-tooltip {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
    pointer-events: none;
    unicode-bidi: plaintext;
}

.input-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.input-tooltip:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.input-tooltip.error {
    background: var(--error-text);
}

.input-tooltip.error:after {
    border-color: var(--error-text) transparent transparent transparent;
}

.input-tooltip.warning {
    background: var(--warning-text);
}

.input-tooltip.warning:after {
    border-color: var(--warning-text) transparent transparent transparent;
}

.input-tooltip.info {
    background: var(--text-light);
}

.input-tooltip.info:after {
    border-color: var(--text-light) transparent transparent transparent;
}

.form-hint {
    display: block;
    margin-top: 15px;
    color: var(--text-light);
    font-size: 14px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .whois-container {
        padding: var(--mobile-spacing);
    }
    
    .search-form-container {
        padding: 20px;
        margin-bottom: var(--mobile-spacing);
    }
    
    .search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    .input-group {
        width: 100%;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
        padding: 16px;
        min-height: 52px;
        margin-top: 5px;
    }
    
    .input-tooltip {
        top: -55px;
        white-space: normal;
        max-width: 90%;
    }
    
    .additional-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .additional-link {
        width: 100%;
        justify-content: center;
    }
    
    .results-container {
        padding: var(--mobile-spacing);
    }
    
    .whois-results h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .whois-table td {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .table-container {
        margin: 0 -16px;
        width: calc(100% + 32px);
        border-left: none;
        border-right: none;
        border-radius: 0;
    }
    
    .whois-table {
        min-width: 100%;
    }
    
    .whois-table .key {
        width: 40%;
    }
    
    .whois-table .value {
        width: 60%;
    }
    
    .search-modal {
        padding: 30px 20px;
    }
    
    .search-timer {
        font-size: 2.5em;
    }
    
    .actions-container {
        text-align: center;
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .actions-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .copy-button, .pdf-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .whois-table td {
        padding: 12px;
        display: block;
        width: 100% !important;
        border-right: none;
    }
    
    .whois-table tr {
        display: block;
        border-bottom: 2px solid var(--border-color);
        padding: 10px 0;
    }
    
    .whois-table .key {
        background: none;
        font-weight: 700;
        border-bottom: 1px dashed var(--border-color);
        padding-bottom: 8px;
        margin-bottom: 8px;
    }
    
    .whois-table .value {
        padding-top: 0;
    }
}
/* Улучшенные стили для результатов WHOIS */
.whois-results {
    margin-top: 25px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whois-results h3 {
    color: #1F2937;
    margin: 0 0 25px 0;
    font-size: 24px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f5f9;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    margin: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.table-container:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.whois-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 600px;
    background: white;
}

.whois-table tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.whois-table tr:last-child {
    border-bottom: none;
}

.whois-table tr:hover {
    background-color: #f9fafb;
}

.whois-table td {
    padding: 16px 20px;
    vertical-align: top;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid #e5e7eb;
}

.whois-table .key {
    width: 35%;
    font-weight: 600;
    color: #1F2937;
    background-color: #f8fafc;
    border-right: 1px solid #e5e7eb;
    font-size: 14px;
}

.whois-table .value {
    width: 65%;
    color: #4b5563;
    word-break: break-word;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
}

.update-row {
    background-color: #f0f9ff !important;
}

.update-date {
    color: #6b7280;
    font-size: 14px;
    text-align: right;
    font-style: italic;
    padding: 15px 20px;
}

/* Стили для свободного домена */
.domain-available-message {
    background: linear-gradient(135deg, #ecfdf5, #dcfce7);
    border: 1px solid #6ee7b7;
    border-left: 4px solid #10b981;
    color: #065f46;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.domain-available-message h3 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(16, 185, 129, 0.2);
}

.available-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.available-icon {
    background: #10b981;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.available-text h4 {
    color: #065f46;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.available-text p {
    margin-bottom: 15px;
    color: #0f766e;
    font-size: 15px;
}

.available-actions {
    background: rgba(16, 185, 129, 0.08);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.available-tip {
    display: block;
    color: #0f766e;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.registrars-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.registrars-list a {
    background: white;
    color: #10b981;
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}

.registrars-list a:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}
