/* IP Address Checker Tool Specific Styles */

/* Tool Header */
.tool-header {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    margin-top: 70px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.tool-header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fbbf24;
    backdrop-filter: blur(10px);
}

.tool-header-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-header-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.tool-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tool-features .feature {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-features .feature i {
    color: #fbbf24;
}

/* IP Tool Section */
.ip-tool {
    padding: 80px 0;
    background: #f8fafc;
}

/* IP Search Form */
.ip-search-form {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.search-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.search-header p {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.input-group {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

.form-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Current IP Display */
.current-ip-display {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.ip-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ip-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.ip-address {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 1rem 2rem;
    border-radius: 12px;
    display: inline-block;
}

.ip-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.detail-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.detail-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

/* IP Results */
.ip-results {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.searched-ip {
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
    background: #f1f5f9;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    display: inline-block;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.result-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-section h3 i {
    color: #3b82f6;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    max-width: 200px;
    word-break: break-word;
}

/* Map Section */
.map-section {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.map-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-section h3 i {
    color: #3b82f6;
}

.map-container {
    background: white;
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.map-display {
    width: 100% !important;
    height: 400px !important;
    display: none;
    position: relative;
}

/* Ensure Leaflet map fills container */
.map-display .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

.map-placeholder {
    color: #94a3b8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.map-placeholder p {
    margin: 0;
    font-size: 1.1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 900px;
    margin: 0 auto 2rem;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-state h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.error-state p {
    color: #64748b;
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header-text h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .ip-details-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 100px 0 60px;
        margin-top: 60px;
    }
    
    .tool-header-text h1 {
        font-size: 1.8rem;
    }
    
    .tool-features {
        flex-direction: column;
        align-items: center;
    }
    
    .ip-search-form {
        padding: 1.5rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .ip-address {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .detail-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .action-buttons,
    .ip-search-form {
        display: none !important;
    }
    
    .ip-tool {
        background: white;
        padding: 0;
    }
    
    .current-ip-display,
    .ip-results {
        box-shadow: none;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .detail-card,
    .result-section {
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
}
