        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        /* Navigation Header Styles */
        .nav-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding: 0 10px;
            animation: fadeInDown 0.6s ease-out;
        }

        .nav-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 20px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(102, 126, 234, 0.2);
            border-radius: 25px;
            text-decoration: none;
            color: #667eea;
            font-weight: 600;
            font-size: 14px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .nav-btn:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
            border-color: transparent;
        }

        .nav-btn i {
            font-size: 16px;
            transition: transform 0.3s ease;
        }

        .nav-btn:hover i {
            transform: scale(1.1);
        }

        .back-home:hover {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
        }

        .more-tools:hover {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
        }

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 40px;
            animation: fadeInDown 0.8s ease-out 0.2s both;
        }

        .header h1 {
            color: white;
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .header p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 1.1em;
        }

        /* Ad Banner Top */
        .ad-banner {
            background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
            height: 120px;
            margin: 20px 0;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            animation: slideInLeft 0.8s ease-out;
            position: relative;
            overflow: hidden;
        }

        .ad-banner::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        .ad-placeholder {
            color: white;
            font-size: 1.2em;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        /* Main Card */
        .main-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
            animation: fadeInUp 0.8s ease-out;
            margin-bottom: 30px;
        }

        /* Form Styles */
        .form-container {
            margin-bottom: 40px;
        }

        .form-row {
            display: flex;
            gap: 15px;
            margin-bottom: 25px;
            align-items: end;
        }

        .input-group {
            flex: 1;
            position: relative;
        }

        .input-with-button {
            position: relative;
            display: flex;
            gap: 10px;
        }

        .input-with-button .input-field {
            flex: 1;
        }

        .current-ip-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
            min-width: 140px;
            justify-content: center;
        }

        .current-ip-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
        }

        .current-ip-btn:active {
            transform: translateY(0);
        }

        .current-ip-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .current-ip-btn.loading {
            background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
        }

        /* Port Selection Styles */
        .port-input-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
            position: relative;
        }

        .port-select {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e1e5e9;
            border-radius: 12px;
            font-size: 16px;
            background: white;
            color: #333;
            cursor: pointer;
            transition: all 0.3s ease;
            appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 15px center;
            background-size: 20px;
            padding-right: 50px;
        }

        .port-select:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
        }

        .port-select:hover {
            border-color: #667eea;
        }

        .port-select option {
            padding: 10px;
            background: white;
            color: #333;
        }

        .port-select option:hover {
            background: #f8f9fa;
        }

        .port-divider {
            text-align: center;
            color: #888;
            font-size: 14px;
            font-weight: 600;
            position: relative;
            padding: 0 20px;
        }

        .port-divider::before,
        .port-divider::after {
            content: '';
            position: absolute;
            top: 50%;
            width: calc(50% - 25px);
            height: 1px;
            background: #e1e5e9;
        }

        .port-divider::before {
            left: 0;
        }

        .port-divider::after {
            right: 0;
        }

        .port-input {
            margin: 0;
        }

        /* Scan Options Styles */
        .scan-options {
            margin-top: 30px;
            margin-bottom: 0;
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .checkbox-container {
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            padding: 25px 30px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(102, 126, 234, 0.1);
            text-align: center;
            max-width: 450px;
            width: 100%;
        }

        .checkbox-label {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            color: #333;
            margin-bottom: 12px;
            transition: all 0.3s ease;
        }

        .checkbox-label:hover {
            color: #667eea;
        }

        .scan-checkbox {
            display: none;
        }

        .checkmark {
            width: 24px;
            height: 24px;
            border: 2px solid #d1d5db;
            border-radius: 6px;
            position: relative;
            transition: all 0.3s ease;
            background: white;
            flex-shrink: 0;
        }

        .scan-checkbox:checked+.checkmark {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-color: #667eea;
        }

        .scan-checkbox:checked+.checkmark::after {
            content: '';
            position: absolute;
            left: 7px;
            top: 3px;
            width: 6px;
            height: 12px;
            border: solid white;
            border-width: 0 2px 2px 0;
            transform: rotate(45deg);
        }

        .checkbox-text {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }

        .checkbox-text i {
            color: #667eea;
        }

        .checkbox-description {
            font-size: 14px;
            color: #666;
            line-height: 1.4;
            margin: 0;
            max-width: 380px;
            margin: 0 auto;
        }

        .input-group label {
            display: block;
            margin-bottom: 5px;
            color: #555;
            font-weight: 600;
        }

        .input-field {
            width: 100%;
            padding: 15px 20px;
            border: 2px solid #e1e5e9;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: white;
        }

        .input-field:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
        }

        .scan-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 140px;
            justify-content: center;
        }

        .scan-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
        }

        .scan-btn:active {
            transform: translateY(0);
        }

        .scan-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        /* Loading Animation */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            backdrop-filter: blur(5px);
        }

        .loading-content {
            background: white;
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: pulse 1.5s infinite;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        /* Results Section */
        .results-section {
            display: none;
            animation: fadeInUp 0.6s ease-out;
        }

        .results-header {
            margin-bottom: 25px;
            padding: 20px;
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            border-radius: 12px;
            color: white;
            text-align: center;
        }

        .results-grid {
            display: grid;
            gap: 15px;
            margin-bottom: 30px;
        }

        .result-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
            border-left: 4px solid #e1e5e9;
            transition: all 0.3s ease;
            opacity: 0;
            transform: translateX(-20px);
        }

        .result-card.open {
            border-left-color: #10b981;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
        }

        .result-card.closed {
            border-left-color: #ef4444;
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.02) 100%);
        }

        .result-card.animate {
            opacity: 1;
            transform: translateX(0);
        }

        .result-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

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

        .port-number {
            font-size: 1.2em;
            font-weight: bold;
            color: #333;
        }

        .service-name {
            background: #f3f4f6;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.9em;
            color: #666;
        }

        .status-badge {
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 0.9em;
            font-weight: 600;
            text-transform: uppercase;
        }

        .status-badge.open {
            background: #10b981;
            color: white;
        }

        .status-badge.closed {
            background: #ef4444;
            color: white;
        }

        .result-details {
            color: #666;
            font-size: 0.9em;
        }

        /* Side Ad Banner */
        .sidebar-ad {
            background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
            width: 300px;
            height: 250px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            position: fixed;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            animation: slideInRight 1s ease-out;
            z-index: 1000;
        }

        /* Animations */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }

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

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

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

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-50px);
            }

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

        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(50px);
            }

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

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        @keyframes pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        @keyframes shimmer {
            0% {
                left: -100%;
            }

            100% {
                left: 100%;
            }
        }

        /* Responsive Design */
        @media (max-width: 1400px) {
            .sidebar-ad {
                display: none;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 15px;
                max-width: 100%;
            }

            .header {
                margin-bottom: 25px;
                padding: 0 10px;
            }

            .header h1 {
                font-size: 1.8em;
                margin-bottom: 8px;
            }

            .header p {
                font-size: 1em;
                line-height: 1.4;
            }

            .ad-banner {
                margin: 15px 0;
                height: 100px;
                border-radius: 10px;
            }

            .ad-placeholder {
                font-size: 1em;
                text-align: center;
                padding: 10px;
            }

            .main-card {
                padding: 25px 20px;
                border-radius: 15px;
                margin: 0 auto 20px;
                max-width: 100%;
            }

            .form-container {
                margin-bottom: 30px;
            }

            .form-row {
                flex-direction: column;
                gap: 20px;
                margin-bottom: 0;
            }

            .input-group {
                width: 100%;
            }

            .input-group label {
                font-size: 14px;
                margin-bottom: 8px;
                font-weight: 600;
            }

            .port-input-container {
                gap: 15px;
            }

            .port-select {
                padding: 18px 16px;
                padding-right: 50px;
                font-size: 16px;
                border-radius: 10px;
                background-size: 18px;
                background-position: right 12px center;
            }

            .port-divider {
                font-size: 13px;
                margin: 5px 0;
            }

            .scan-options {
                margin-top: 25px;
            }

            .checkbox-container {
                padding: 20px 15px;
                border-radius: 12px;
                max-width: 100%;
            }

            .checkbox-label {
                font-size: 15px;
                gap: 12px;
                margin-bottom: 10px;
            }

            .checkmark {
                width: 22px;
                height: 22px;
            }

            .scan-checkbox:checked+.checkmark::after {
                left: 6px;
                top: 2px;
                width: 5px;
                height: 11px;
            }

            .checkbox-description {
                font-size: 13px;
                line-height: 1.3;
            }

            .input-with-button {
                flex-direction: column;
                gap: 12px;
            }

            .input-field {
                padding: 18px 16px;
                font-size: 16px;
                border-radius: 10px;
                width: 100%;
                box-sizing: border-box;
            }

            .current-ip-btn {
                min-width: auto;
                width: 100%;
                padding: 16px 20px;
                font-size: 15px;
                border-radius: 10px;
                gap: 8px;
            }

            .scan-btn {
                width: 100%;
                padding: 18px 30px;
                font-size: 16px;
                border-radius: 10px;
                margin-top: 10px;
            }

            .sidebar-ad {
                position: static;
                width: calc(100% - 30px);
                height: 120px;
                margin: 15px auto;
                transform: none;
                display: flex;
                border-radius: 10px;
            }

            .results-section {
                margin-top: 20px;
            }

            .results-header {
                padding: 20px 15px;
                border-radius: 10px;
                margin-bottom: 20px;
            }

            .results-header h3 {
                font-size: 1.3em;
                margin-bottom: 5px;
            }

            .results-header p {
                font-size: 0.95em;
            }

            .result-card {
                padding: 18px 15px;
                border-radius: 10px;
                margin-bottom: 12px;
            }

            .result-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
                margin-bottom: 12px;
            }

            .port-info {
                align-self: stretch;
                justify-content: space-between;
            }

            .port-number {
                font-size: 1.1em;
            }

            .service-name {
                font-size: 0.85em;
                padding: 3px 10px;
            }

            .status-badge {
                align-self: flex-start;
                font-size: 0.85em;
                padding: 5px 12px;
            }

            .result-details {
                font-size: 0.9em;
                line-height: 1.4;
            }

            .info-section {
                margin-top: 25px;
            }

            .info-card {
                padding: 25px 20px;
                border-radius: 15px;
                margin: 0 auto;
                max-width: 100%;
            }

            .info-title {
                font-size: 1.4em;
                margin-bottom: 20px;
                gap: 12px;
                line-height: 1.3;
            }

            .info-content {
                font-size: 1em;
                line-height: 1.6;
            }

            .info-content p {
                margin-bottom: 16px;
            }

            /* Loading overlay mobile adjustments */
            .loading-content {
                margin: 20px;
                padding: 30px 25px;
                border-radius: 15px;
                max-width: 90%;
            }

            .loading-content h3 {
                font-size: 1.2em;
                margin-bottom: 8px;
            }

            .loading-content p {
                font-size: 0.9em;
            }

            /* Better touch targets */
            button,
            .input-field {
                min-height: 48px;
            }

            /* Improved spacing for mobile */
            .form-row>* {
                margin-bottom: 0;
            }
        }

        /* Progress Bar */
        .progress-container {
            width: 100%;
            height: 6px;
            background: #e1e5e9;
            border-radius: 3px;
            margin: 20px 0;
            overflow: hidden;
            display: none;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 3px;
            transition: width 0.3s ease;
            width: 0%;
        }

        /* Information Section */
        .info-section {
            margin-top: 40px;
            animation: fadeInUp 1s ease-out;
        }

        .info-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
            border-left: 5px solid #667eea;
        }

        .info-title {
            color: #333;
            font-size: 1.8em;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 15px;
            font-weight: 700;
        }

        .info-title i {
            color: #667eea;
            font-size: 0.9em;
        }

        .info-content {
            color: #555;
            font-size: 1.1em;
            line-height: 1.8;
        }

        .info-content p {
            margin-bottom: 20px;
        }

        .info-content p:last-child {
            margin-bottom: 0;
        }

        .info-content strong {
            color: #333;
            font-weight: 600;
        }

        .info-content em {
            color: #667eea;
            font-style: normal;
            font-weight: 500;
        }

        /* Screen Reader Only Content */
        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Modern Footer Styles */
        .modern-footer {
            background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
            margin-top: 60px;
            position: relative;
            overflow: hidden;
        }

        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 40px 20px 30px;
            position: relative;
            z-index: 2;
        }

        .footer-branding {
            text-align: center;
            color: white;
        }

        .powered-by {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-size: 18px;
            margin-bottom: 15px;
            animation: fadeInUp 0.8s ease-out;
        }

        .powered-by i {
            color: #667eea;
            font-size: 20px;
        }

        .powered-by strong {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 700;
        }

        .footer-suggestion {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            font-size: 14px;
            color: #a0aec0;
            line-height: 1.5;
            animation: fadeInUp 0.8s ease-out 0.2s both;
        }

        .footer-suggestion i {
            color: #667eea;
            flex-shrink: 0;
        }

        .footer-suggestion a {
            color: #667eea;
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            position: relative;
        }

        .footer-suggestion a:hover {
            color: #764ba2;
            transform: translateY(-1px);
        }

        .footer-suggestion a::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            transition: width 0.3s ease;
        }

        .footer-suggestion a:hover::after {
            width: 100%;
        }

        .footer-decoration {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .footer-wave {
            position: absolute;
            top: -50px;
            left: 0;
            width: 100%;
            height: 100px;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-radius: 50% 50% 0 0 / 100% 100% 0 0;
            animation: wave 3s ease-in-out infinite;
        }

        @keyframes wave {

            0%,
            100% {
                transform: translateY(0px) rotate(0deg);
            }

            50% {
                transform: translateY(-10px) rotate(1deg);
            }
        }

        /* Footer Mobile Responsiveness */
        @media (max-width: 768px) {
            .nav-header {
                flex-direction: column;
                gap: 12px;
                margin-bottom: 25px;
                padding: 0;
            }

            .nav-btn {
                width: 100%;
                justify-content: center;
                padding: 14px 20px;
                font-size: 15px;
            }

            .modern-footer {
                margin-top: 40px;
            }

            .footer-content {
                padding: 30px 15px 25px;
            }

            .powered-by {
                font-size: 16px;
                margin-bottom: 12px;
                flex-direction: column;
                gap: 5px;
            }

            .footer-suggestion {
                font-size: 13px;
                flex-direction: column;
                gap: 8px;
                text-align: center;
                line-height: 1.4;
            }

            .footer-suggestion span {
                display: flex;
                flex-direction: column;
                gap: 5px;
                align-items: center;
            }

            .footer-wave {
                top: -30px;
                height: 60px;
            }
        }