/* Custom CSS for IP Information Portal */
@import "tailwindcss";
/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideOutUp {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

/* Spinner animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom hover effects for info cards */
.info-card {
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Main IP display effects */
#main-ip {
    transition: all 0.3s ease;
}

#main-ip:hover {
    transform: scale(1.02);
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* Toast notification styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.error {
    background: #ef4444;
}

/* Loading spinner enhancement */
.loading-container {
    position: relative;
}

.loading-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Button hover effects */
button {
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Responsive text sizing */
@media (max-width: 768px) {
    .text-6xl {
        font-size: 3rem !important;
    }
    
    .text-4xl {
        font-size: 2rem !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card glow effect */
.glow-on-hover {
    position: relative;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.5s;
}

.glow-on-hover:hover::before {
    left: 100%;
}

/* Coordinate clickable styling */
.coordinates-clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.coordinates-clickable:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Error state styling */
.error-state {
    animation: fadeIn 0.5s ease;
}

/* Success state styling */
.success-state {
    animation: slideInDown 0.5s ease;
}

/* Custom focus styles for accessibility */
button:focus,
.clickable:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .bg-gradient-to-br {
        background: white !important;
    }
}

.code-block-container {
    position: relative;
    background-color: #f4f4f5; /* Tailwind gray-100 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}
.code-block {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    color: #1f2937; /* Tailwind gray-800 */
}
.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #3b82f6; /* Tailwind blue-600 */
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s;
    z-index: 10; /* Ensure button is above code */
}
.copy-button:hover {
    background-color: #2563eb; /* Tailwind blue-700 */
}
