:root {

            --bg-primary: #f8f9fa;
            --bg-secondary: #ffffff;
            --text-primary: #333;
            --text-secondary: #666;
            --border-color: #e2e8f0;
            --shadow: rgba(0,0,0,0.1);
            --header-bg: #ffffff;
            --header-text: #333;
        }

        [data-theme="dark"] {

            --bg-primary: #1a202c;
            --bg-secondary: #2d3748;
            --text-primary: #ffffff;
            --text-secondary: #cbd5e0;
            --border-color: #4a5568;
            --shadow: rgba(0,0,0,0.3);
            --header-bg: #1a202c;
            --header-text: #ffffff;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            padding: 20px;
            transition: background 0.3s, color 0.3s;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .header {
            background: var(--header-bg);
            padding: 15px 20px;
            margin: -20px -20px 20px -20px;
            box-shadow: 0 2px 4px var(--shadow);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            border-bottom: 3px solid #22C55E;
        }

        .header-left {
            color: #fff;
            font-size: 18px;
            font-weight: 600;
        }

        .visitor-info-container {
            position: relative;
        }

        .visitor-info-container .visitor-info {
            color: var(--header-text);
            font-size: 13px;
        }

        @media (max-width: 768px) {
            .visitor-info-container .visitor-info {
                font-size: 20px;
            }

            .visitor-info-container .visitor-info a {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 8px 12px;
                background: var(--bg-secondary);
                border-radius: 6px;
                transition: all 0.2s;
            }

            .visitor-info-container .visitor-info a:active {
                transform: scale(0.95);
                background: var(--accent-color);
            }
        }

        .visitor-info-container .visitor-info strong {
            color: var(--header-text);
        }

        .visitor-info-container .visitor-info a {
            color: var(--header-text);
            text-decoration: none;
        }

        .visitor-info-container .visitor-info a:hover {
            text-decoration: underline;
        }

        .flag-icon {
            width: 18px;
            height: 12px;
            margin-right: 6px;
            object-fit: cover;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 2px;
        }

        @media (max-width: 768px) {
            .visitor-info-container .flag-icon {
                width: 27px;
                height: 18px;
                margin-right: 8px;
            }

            #langToggle {
                padding: 6px 10px !important;
                min-width: auto !important;
                width: auto !important;
                gap: 0 !important;
                font-size: 11px !important;
                display: inline-flex !important;
            }

            #langToggle #langText {
                display: none !important;
            }

            #langToggle .lang-flag-icon {
                width: 14px !important;
                height: 10px !important;
                margin: 0 !important;
            }

            #langToggle #langFlag {
                font-size: 14px !important;
                line-height: 1 !important;
                display: inline-block !important;
            }
        }

        .iso-code {
            color: #999;
            font-size: 11px;
            margin-left: 4px;
        }

        .tabs-nav {
            background: var(--bg-secondary);
            border-radius: 8px 8px 0 0;
            padding: 10px 20px;
            margin-bottom: 0;
            box-shadow: 0 2px 4px var(--shadow);
            display: flex;
            gap: 5px;
        }

        .tab-btn {
            padding: 8px 16px;
            background: transparent;
            border: none;
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .tab-btn:hover:not(.active) {
            background: #e8f0ff;
            color: #1a202c;
        }

        .tab-btn.active {
            background: var(--bg-secondary);
            color: var(--text-primary);
            border: 2px solid #22C55E;
            font-weight: 600;
        }

        .tab-btn.active:hover {
            background: #22C55E;
            color: white;
        }

        .whois-btn {
            padding: 10px 24px;
            background: #1a202c;
            border: none;
            border-radius: 6px;
            color: white;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .whois-btn:hover {
            background: #073482;
        }

        .whois-btn:active {
            transform: translateY(0);
        }

        .search-box {
            background: var(--bg-secondary);
            border-radius: 0 0 8px 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px var(--shadow);
        }

        .news-container {
            background: var(--bg-secondary);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px var(--shadow);
        }

        .news-item {
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 15px;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .news-item:last-child {
            margin-bottom: 0;
        }

        .news-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .input-group {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }

        input[type="text"], input[type="number"] {
            flex: 1;
            padding: 10px 15px;
            background: #ffffff;
            border: 1px solid #ddd;
            border-radius: 6px;
            color: #333;
            font-size: 14px;
            transition: border-color 0.2s;
        }

        input[type="text"]:focus, input[type="number"]:focus {
            outline: none;
            border-color: #1a202c;
        }

        input[type="text"]::placeholder {
            color: #999;
        }

        button {
            padding: 10px 25px;
            background: #1a202c;
            border: none;
            border-radius: 6px;
            color: white;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        button:hover:not(:disabled) {
            background: #073482;
        }

        button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .record-type-selector {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .record-type-btn {
            padding: 6px 14px;
            background: #f8f9fa;
            border: 1px solid #e0e0e0;
            border-radius: 6px;
            color: #6c757d;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .record-type-btn:hover:not(.active) {
            background: #e8f0ff;
            border-color: #1a202c;
            color: #1a202c;
        }

        .record-type-btn.active {
            background: #1a202c;
            border-color: #1a202c;
            color: #ffffff !important;
        }

        .record-type-btn.active:hover {
            background: #0d2847;
            border-color: #0d2847;
            color: #ffffff !important;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .results-container {
            background: var(--bg-secondary);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            box-shadow: 0 2px 10px var(--shadow);
            display: none;
        }

        .results-container.show {
            display: block;
            animation: fadeIn 0.5s;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .section-header {
            background: var(--bg-secondary);
            padding: 10px 15px;
            margin: 15px -20px;
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
            border-left: 3px solid #22C55E;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
            font-size: 13px;
            table-layout: fixed;
        }

        thead {
            background: var(--bg-primary);
        }

        table {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }

        tbody tr {
            border-bottom: 1px solid var(--border-color);
        }

        th {
            padding: 10px 12px;
            text-align: left;
            color: #6c757d;
            font-weight: 600;
            font-size: 12px;
            text-transform: uppercase;
            border-bottom: 1px solid #e0e0e0;
        }

        td {
            padding: 10px 12px;
            border-bottom: 1px solid #f5f5f5;
            color: var(--text-primary);
            word-wrap: break-word;
            word-break: break-word;
            overflow-wrap: break-word;
            max-width: 0;
        }

        tbody tr:hover {
            background: var(--bg-primary);
        }

        .section-header {
            color: var(--text-primary);
        }

        h2, h3 {
            color: var(--text-primary);
        }

        .dns-provider {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .provider-icon {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            background: #1a202c;
            color: white;
            flex-shrink: 0;
        }

        .provider-name {
            font-weight: 600;
            color: #333;
            font-size: 13px;
        }

        .provider-location {
            font-size: 11px;
            color: #999;
        }

        .ip-address {
            font-family: 'Courier New', monospace;
            color: #1a202c;
            font-weight: 600;
            font-size: 13px;
        }

        .ptr-record {
            word-break: break-all;
            overflow-wrap: anywhere;
            hyphens: auto;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            line-height: 1.4;
        }

        .status {
            display: inline-block;
            padding: 6px 14px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        .status.success {
            background: #d4edda;
            color: #155724;
        }

        .status.error {
            background: #f8d7da;
            color: #721c24;
        }

        [data-theme="dark"] .status.success {
            background: rgba(72, 187, 120, 0.2);
            color: #68d391;
            border: 1px solid #48bb78;
        }

        [data-theme="dark"] .status.error {
            background: rgba(252, 129, 129, 0.2);
            color: #fc8181;
            border: 1px solid #f56565;
        }

        .loading-spinner {
            border: 3px solid #f3f3f3;
            border-radius: 50%;
            border-top-color: #1a202c;
            width: 20px;
            height: 20px;
            animation: spin 0.8s linear infinite;
            display: inline-block;
            margin-right: 10px;
            vertical-align: middle;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .alert-info {
            background: #e7f3ff;
            border: 1px solid #b3d9ff;
            border-left: 4px solid #1a202c;
            padding: 15px 20px;
            border-radius: 8px;
            margin-top: 20px;
            color: #1a202c;
            font-size: 14px;
        }

        .alert-error {
            background: #f8d7da;
            border: 1px solid #f5c6cb;
            border-left: 4px solid #dc3545;
            padding: 15px 20px;
            border-radius: 8px;
            color: #721c24;
            text-align: center;
        }

        .footer {
            text-align: center;
            padding: 30px 20px;
            color: #6c757d;
            font-size: 14px;
        }

        .footer a {
            color: #1a202c;
            text-decoration: none;
            font-weight: 600;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        h2 {
            color: #1a202c;
            font-size: 1.4em;
            margin-bottom: 15px;
            font-weight: 700;
        }

        h2 span {
            color: #073482;
        }

        .ttl-value, .time-value {
            color: #6c757d;
            font-size: 12px;
        }

        .port-input-group {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .port-input-group input[type="number"] {
            width: 100px;
        }

        .input-clear-btn {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: transparent;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px;
            font-size: 16px;
            transition: color 0.2s;
            z-index: 10;
        }

        .input-clear-btn:hover {
            color: #dc3545;
        }

        @media (max-width: 768px) {
            .input-group {
                flex-direction: column;
            }

            button {
                width: 100%;
            }

            th, td {
                padding: 10px;
                font-size: 13px;
            }

            .header h1 {
                font-size: 2em;
            }

            .search-box::after {
                width: 60px;
                height: 60px;
            }
        }

        [data-theme="dark"] .news-item {
            background: var(--bg-secondary) !important;
            border-left: 4px solid #22C55E !important;
        }

        [data-theme="dark"] .news-item h3 {
            color: #22C55E !important;
        }

        [data-theme="dark"] .news-item p {
            color: var(--text-secondary) !important;
        }

        [data-theme="dark"] .news-item div {
            color: var(--text-secondary) !important;
        }

        [data-theme="dark"] th {
            color: var(--text-secondary) !important;
        }

        [data-theme="dark"] td {
            color: var(--text-primary) !important;
        }

        [data-theme="dark"] .alert-error,
        [data-theme="dark"] .alert-success {
            background: var(--bg-secondary) !important;
            color: var(--text-primary) !important;
        }

        [data-theme="dark"] input[type="text"] {
            background: var(--bg-secondary) !important;
            color: var(--text-primary) !important;
            border-color: var(--border-color) !important;
        }

        [data-theme="dark"] input[type="text"]::placeholder {
            color: var(--text-secondary) !important;
        }

        [data-theme="dark"] .section-header {
            background: var(--bg-secondary) !important;
            color: var(--text-primary) !important;
            border-left-color: #22C55E !important;
        }

        [data-theme="dark"] .ip-address {
            color: #ffffff !important;
            font-weight: 500 !important;
        }

        [data-theme="dark"] h2 span {
            color: #60a5fa !important;
        }

        [data-theme="dark"] .iso-code {
            color: var(--text-secondary) !important;
        }

        .report-link-block {
            margin: 10px 0;
            padding: 8px 12px;
            background: var(--bg-secondary);
            border-radius: 4px;
            border-left: 3px solid #22C55E;
            font-size: 12px;
        }

        .report-link-content {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }

        .report-link-label {
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
        }

        .report-link-input {
            flex: 1;
            min-width: 150px;
            padding: 4px 8px;
            background: var(--bg-primary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            border-radius: 3px;
            font-size: 11px;
            font-family: monospace;
        }

        .report-link-btn {
            padding: 6px 12px;
            background: var(--bg-secondary);
            color: #1e3a8a;
            border: 2px solid #1e3a8a;
            border-radius: 6px;
            cursor: pointer;
            font-size: 14px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            transition: all 0.2s;
        }

        .report-link-btn:hover {
            background: #1e3a8a;
            color: white;
        }

        .report-link-btn i {
            color: #1e3a8a;
            font-size: 14px;
        }

        .report-link-btn:hover i {
            color: white;
        }

        [data-theme="dark"] .report-link-btn {
            border-color: #60a5fa;
        }

        [data-theme="dark"] .report-link-btn i {
            color: #60a5fa;
        }

        [data-theme="dark"] .report-link-btn:hover {
            background: #60a5fa;
        }

        [data-theme="dark"] .report-link-btn:hover i {
            color: white;
        }

        .report-link-copy {
            background: var(--bg-secondary);
        }

        .report-link-open {
            background: var(--bg-secondary);
        }

        [data-theme="dark"] tbody td,
        [data-theme="dark"] tbody td div,
        [data-theme="dark"] tbody td span {
            color: #ffffff !important;
        }

        [data-theme="dark"] .status-message {
            color: #cbd5e0 !important;
        }

        [data-theme="dark"] h2 {
            color: #ffffff !important;
        }

        [data-theme="dark"] h3 {
            color: #ffffff !important;
        }

        [data-theme="dark"] .results-container h2,
        [data-theme="dark"] .results-container h3 {
            color: #ffffff !important;
        }
