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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --bg-gradient-start: #667eea;
    --bg-gradient-end: #764ba2;
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mode-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.search-section {
    margin-bottom: 30px;
    width: 100%;
}

.search-container {
    display: flex;
    gap: 10px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.ip-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.ip-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ip-input::placeholder {
    color: var(--text-secondary);
}

.lookup-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.lookup-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.my-ip-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.my-ip-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

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

.batch-section {
    margin-bottom: 30px;
    width: 100%;
}

.batch-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.batch-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
    min-height: 150px;
}

.batch-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.batch-input::placeholder {
    color: var(--text-secondary);
}

.batch-actions {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.batch-lookup-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.batch-lookup-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.batch-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.current-ip-display {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.processing-icon {
    animation: spin 1s linear infinite;
    font-size: 1.2rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#currentIpText {
    color: white;
    font-weight: 500;
}

.progress-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 5px;
    transition: width 0.3s ease;
    width: 0%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-stats span {
    font-size: 0.9rem;
    color: white;
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.patience-message {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
    margin-top: 10px;
}

.patience-message p {
    color: white;
    margin: 5px 0;
    font-size: 0.9rem;
}

.patience-message .patience-note {
    font-size: 0.85rem;
    opacity: 0.9;
    font-style: italic;
}

.api-info-note {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #3b82f6;
}

.api-info-note p {
    color: white;
    margin: 8px 0;
    font-size: 0.9rem;
}

.api-info-note strong {
    color: #fbbf24;
}

.api-info-note ul {
    color: white;
    margin: 8px 0 8px 20px;
    font-size: 0.85rem;
}

.api-info-note li {
    margin: 4px 0;
}

.api-note-small {
    font-size: 0.8rem !important;
    opacity: 0.85;
    font-style: italic;
    margin-top: 10px !important;
}

.report-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in;
    margin-top: 30px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.report-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.print-btn {
    background: #10b981;
}

.print-btn:hover {
    background: #059669;
}

.download-btn {
    background: #3b82f6;
}

.download-btn:hover {
    background: #2563eb;
}

.share-dropdown {
    position: relative;
}

.share-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.share-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.share-link:last-child {
    border-bottom: none;
}

.share-link:hover {
    background: #f3f4f6;
    color: var(--primary-color);
}

.share-link svg {
    width: 20px;
    height: 20px;
}

.report-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.report-summary h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.report-summary p {
    color: var(--text-secondary);
    margin: 5px 0;
}

.report-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.report-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.report-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.report-table tbody tr:hover {
    background: #f9fafb;
}

.report-table tbody tr:last-child td {
    border-bottom: none;
}

@media print {
    body {
        background: white;
    }
    
    .mode-toggle,
    .search-section,
    .batch-section,
    .report-header .report-actions,
    footer {
        display: none !important;
    }
    
    .report-card {
        box-shadow: none;
        padding: 0;
    }
    
    .report-table {
        page-break-inside: auto;
    }
    
    .report-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

.info-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.api-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.api-label {
    font-weight: 500;
}

.api-name {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.refresh-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.refresh-btn:hover {
    background: var(--primary-dark);
    transform: rotate(180deg);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.95);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.compact-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.compact-item {
    padding: 10px;
}

.compact-item .info-label {
    font-size: 0.75rem;
    margin-bottom: 5px;
}

.compact-item .info-value {
    font-size: 0.95rem;
    line-height: 1.3;
}

.single-ip-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.info-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.icon {
    font-size: 1rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.4;
}

.loading {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    font-size: 1.1rem;
    margin-top: 15px;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

footer {
    margin-top: 30px;
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

footer a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.7;
}

.applications-section {
    margin-top: 50px;
    width: 100%;
}

.applications-container {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.applications-container h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.applications-container h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 30px 0 20px 0;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 40px;
}

.how-to-use {
    margin-bottom: 50px;
}

.steps {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.step {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.step-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.applications-grid h3 {
    text-align: center;
}

.app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.app-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.app-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.app-card h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0 0 12px 0;
}

.app-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 8px 0;
}

.app-card strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Summary & Analysis Section */
.summary-section {
    margin-top: 30px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.summary-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.summary-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.2;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 3px;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
    line-height: 1.3;
}

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

.suggestions-section h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.suggestion-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.suggestion-card.high {
    border-left: 3px solid #ef4444;
}

.suggestion-card.medium {
    border-left: 3px solid #f59e0b;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.suggestion-icon {
    font-size: 1.3rem;
}

.suggestion-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.suggestion-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.suggestion-item {
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.suggestion-text {
    margin-bottom: 8px;
}

.suggestion-text strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 6px;
}

.suggestion-recommendation {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.suggestion-action {
    margin-top: 8px;
}

.action-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.no-suggestions {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px;
    font-style: italic;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .summary-section {
        padding: 15px;
        margin-top: 20px;
    }

    .summary-header h2 {
        font-size: 1.3rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-card {
        padding: 12px;
    }

    .suggestion-card {
        padding: 12px;
    }
}

/* 2D Earth Map Styles */
.map-section {
    margin-top: 40px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.map-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
}

.close-map-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-map-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.earth-map {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    position: relative;
}

/* Hide Leaflet attribution */
.earth-map .leaflet-control-attribution {
    display: none !important;
}

.map-info {
    margin-top: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.map-info p {
    margin: 0;
}

@media (max-width: 768px) {
    .earth-map {
        height: 400px;
    }

    .map-section {
        padding: 20px;
    }

    .map-header h2 {
        font-size: 1.4rem;
    }
}

/* Print Dialog Modal */
.print-dialog-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.print-dialog-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.print-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.print-dialog-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.close-dialog-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-dialog-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.print-dialog-body {
    margin-bottom: 25px;
}

.print-dialog-body p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1rem;
}

.print-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.print-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.print-option:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.print-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.print-option span {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.print-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.dialog-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: var(--border-color);
    color: var(--text-primary);
}

.cancel-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.print-confirm-btn {
    background: var(--primary-color);
    color: white;
}

.print-confirm-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-dialog-modal {
        display: none !important;
    }

    .applications-section {
        display: none !important;
    }

    .map-section {
        page-break-inside: avoid;
    }

    .summary-section {
        page-break-inside: avoid;
    }

    .report-card {
        page-break-inside: avoid;
    }

    .earth-map {
        height: 500px !important;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .mode-toggle {
        flex-direction: column;
    }

    .mode-btn {
        width: 100%;
    }

    .search-container {
        flex-direction: column;
    }

    .lookup-btn,
    .my-ip-btn {
        width: 100%;
        justify-content: center;
    }

    .batch-actions {
        flex-direction: column;
    }

    .batch-lookup-btn {
        width: 100%;
        justify-content: center;
    }

    .report-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-actions {
        width: 100%;
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .share-menu {
        right: auto;
        left: 0;
        width: 100%;
    }

    .report-table {
        font-size: 0.85rem;
    }

    .report-table th,
    .report-table td {
        padding: 10px 8px;
    }

    .info-card {
        padding: 15px;
    }

    .card-header h2 {
        font-size: 1.2rem;
    }

    .compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .compact-item {
        padding: 10px;
    }

    .compact-item .info-value {
        font-size: 0.9rem;
    }

    .applications-container {
        padding: 20px;
    }

    .applications-container h2 {
        font-size: 1.5rem;
    }

    .applications-container h3 {
        font-size: 1.2rem;
    }

    .steps {
        flex-direction: column;
    }

    .step {
        max-width: 100%;
    }

    .app-cards {
        grid-template-columns: 1fr;
    }

    .single-ip-actions {
        flex-direction: column;
    }

    .single-ip-actions .action-btn {
        width: 100%;
        justify-content: center;
    }

    .applications-container {
        padding: 25px;
    }

    .applications-container h2 {
        font-size: 1.5rem;
    }

    .steps {
        flex-direction: column;
    }

    .step {
        max-width: 100%;
    }

    .app-cards {
        grid-template-columns: 1fr;
    }

    .info-value {
        font-size: 1.1rem;
    }

    .compact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .info-card {
        padding: 20px;
    }
}

