/* Custom styles for Bio Link */

/* Dark theme colors */
.bg-dark-900 {
    background-color: #0f172a;
}

.bg-dark-800 {
    background-color: #1e293b;
}

.bg-dark-700 {
    background-color: #334155;
}

.bg-dark-600 {
    background-color: #475569;
}

.bg-dark-800\/50 {
    background-color: rgba(30, 41, 59, 0.5);
}

.bg-dark-900\/80 {
    background-color: rgba(15, 23, 42, 0.8);
}

.text-dark-900 {
    color: #0f172a;
}

.text-dark-800 {
    color: #1e293b;
}

.text-dark-700 {
    color: #334155;
}

.text-dark-600 {
    color: #475569;
}

.border-dark-900 {
    border-color: #0f172a;
}

.border-dark-800 {
    border-color: #1e293b;
}

.border-dark-700 {
    border-color: #334155;
}

.border-dark-600 {
    border-color: #475569;
}

/* Focus states */
.focus\:border-purple-500:focus {
    border-color: #8b5cf6;
}

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Animation */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

/* Inter font */
.font-inter {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Global box-sizing fix */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Additional utility classes for dark theme buttons */
.bg-red-500\/20 {
    background-color: rgba(239, 68, 68, 0.2);
}

.bg-red-500\/30 {
    background-color: rgba(239, 68, 68, 0.3);
}

.bg-red-600\/20 {
    background-color: rgba(220, 38, 38, 0.2);
}

.bg-green-500\/20 {
    background-color: rgba(34, 197, 94, 0.2);
}

.bg-green-600\/20 {
    background-color: rgba(22, 163, 74, 0.2);
}

.bg-blue-600\/20 {
    background-color: rgba(37, 99, 235, 0.2);
}

.bg-gray-600\/20 {
    background-color: rgba(75, 85, 99, 0.2);
}

.bg-purple-500\/20 {
    background-color: rgba(168, 85, 247, 0.2);
}

.bg-purple-500\/30 {
    background-color: rgba(168, 85, 247, 0.3);
}

.ring-purple-500\/30 {
    --tw-ring-color: rgba(168, 85, 247, 0.3);
}

/* Fix for Tailwind 2.x missing utilities */
.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-x-2>*+* {
    margin-left: 0.5rem;
}

.space-x-4>*+* {
    margin-left: 1rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

/* Inset utility */
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Shrink utility */
.shrink-0 {
    flex-shrink: 0;
}

/* Truncate */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Aspect ratio */
.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Cover object fit */
.object-cover {
    object-fit: cover;
}

/* Transform utilities */
.transform {
    transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.translate-y-0 {
    transform: translateY(0);
}

.top-1\/2 {
    top: 50%;
}

/* Scale utilities */
.scale-100 {
    transform: scale(1);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

/* Backdrop blur */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* ============================================
   Custom Modal & Alert Styles
   ============================================ */

.custom-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: #1e293b;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-icon {
    margin-bottom: 20px;
}

.custom-modal-message {
    color: #e2e8f0;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.custom-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-modal-btn {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-width: 100px;
}

.custom-modal-btn-primary {
    color: white;
}

.custom-modal-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.custom-modal-btn-secondary {
    background: #374151;
    color: #9ca3af;
}

.custom-modal-btn-secondary:hover {
    background: #4b5563;
    color: white;
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast.active {
    transform: translateX(0);
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    flex: 1;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .custom-modal {
        padding: 24px;
        margin: 16px;
    }

    .custom-modal-buttons {
        flex-direction: column;
    }

    .custom-modal-btn {
        width: 100%;
    }

    .toast-container {
        left: 20px;
        right: 20px;
    }

    .toast {
        transform: translateY(-120%);
    }

    .toast.active {
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Utilities
   ============================================ */

/* Container */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Grid columns responsive */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Col span */
.col-span-1 {
    grid-column: span 1 / span 1;
}

.col-span-2 {
    grid-column: span 2 / span 2;
}

.col-span-3 {
    grid-column: span 3 / span 3;
}

/* Flex utilities */
.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1 1 0%;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

/* Width utilities */
.w-full {
    width: 100%;
}

.max-w-xs {
    max-width: 20rem;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-xl {
    max-width: 36rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.max-w-7xl {
    max-width: 80rem;
}

/* Min width */
.min-w-0 {
    min-width: 0;
}

/* Height */
.h-screen {
    height: 100vh;
}

.min-h-screen {
    min-height: 100vh;
}

/* Overflow */
.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

.overflow-hidden {
    overflow: hidden;
}

/* Text responsive */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* Breakpoint: sm (640px) */
@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sm\:flex-row {
        flex-direction: row;
    }

    .sm\:px-6 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sm\:text-lg {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }

    .sm\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .sm\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

/* Breakpoint: md (768px) */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:w-auto {
        width: auto;
    }

    .md\:text-xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .md\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Breakpoint: lg (1024px) */
@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }

    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .lg\:flex-row {
        flex-direction: row;
    }

    .lg\:px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .lg\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .lg\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

/* Breakpoint: xl (1280px) */
@media (min-width: 1280px) {
    .xl\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .xl\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Hide/Show responsive */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline {
    display: inline;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.grid {
    display: grid;
}

@media (min-width: 640px) {
    .sm\:block {
        display: block;
    }

    .sm\:hidden {
        display: none;
    }

    .sm\:flex {
        display: flex;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }

    .md\:hidden {
        display: none;
    }

    .md\:flex {
        display: flex;
    }
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }

    .lg\:hidden {
        display: none;
    }

    .lg\:flex {
        display: flex;
    }
}

/* Mobile-first improvements */
@media (max-width: 640px) {

    /* Prevent horizontal overflow */
    section,
    div,
    main,
    article,
    aside {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Fix long words breaking layout */
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    span,
    a {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Fix inputs and buttons overflow */
    input,
    textarea,
    select,
    button {
        max-width: 100%;
    }

    /* Navigation adjustments */
    nav .space-x-4>*+* {
        margin-left: 0.5rem;
    }

    nav .text-xl {
        font-size: 1rem;
    }

    nav .flex.items-center {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Form inputs full width */
    input,
    textarea,
    select {
        font-size: 16px;
        /* Prevents iOS zoom */
    }

    /* Cards smaller padding */
    .glass {
        padding: 1rem;
    }

    /* Grid gaps smaller */
    .gap-8 {
        gap: 1rem;
    }

    .gap-4 {
        gap: 0.75rem;
    }

    /* Button text smaller */
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Make tables scrollable */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Very small screens (320px) */
@media (max-width: 360px) {
    body {
        font-size: 14px;
    }

    .text-4xl {
        font-size: 1.5rem;
    }

    .text-3xl {
        font-size: 1.25rem;
    }

    .text-2xl {
        font-size: 1.125rem;
    }

    .px-4 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .py-8 {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better touch targets */
@media (pointer: coarse) {

    button,
    a,
    input,
    select,
    textarea {
        min-height: 44px;
    }
}

/* Print styles */
@media print {

    .glass,
    .glass-dark {
        background: white !important;
        border: 1px solid #ccc !important;
    }

    nav,
    footer {
        display: none !important;
    }
}