/* Custom theme colors */
:root {
    --ck-primary: #FF6B6B;
    --ck-darker: #E85F5F;
    --ck-dark: #2D2D2D;
    --ck-gray: #646464;
    --ck-light: #FFF8F8;
}

/* Global link styling */
a {
    color: var(--ck-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--ck-darker);
}

a.disabled {
    color: var(--ck-gray);
    pointer-events: none;
    opacity: 0.6;
}

/* Override default theme */
.btn-primary {
    background-color: var(--ck-primary);
    border-color: var(--ck-primary);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--ck-darker);
    border-color: var(--ck-darker);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(232, 95, 95, 0.2);
}

.btn-outline-primary {
    color: var(--ck-primary);
    border-color: var(--ck-primary);
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: var(--ck-primary);
    border-color: var(--ck-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(232, 95, 95, 0.2);
}

.btn-outline-primary.disabled,
.btn-outline-primary:disabled,
span.btn-outline-primary.disabled {
    color: var(--ck-gray);
    border-color: var(--ck-gray);
    opacity: 0.6;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.text-primary {
    color: var(--ck-primary) !important;
}

/* Layout customization */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--ck-light);
}

.top-row {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

.content-wrapper {
    width: 100%;
    min-height: calc(100vh - 72px);
}

/* Hero section */
.hero-section {
    padding: 4rem 0;
    background: linear-gradient(165deg, #fff 0%, var(--ck-light) 100%);
    border-radius: 1rem;
    margin: 1rem;
    border: 1px solid rgba(255, 107, 107, 0.1);
}

/* Features section */
.features-section {
    padding: 3rem 0;
}

.features-section i {
    color: var(--ck-primary);
}

/* Latest kittens section */
.latest-kittens-section {
    padding: 2rem 0;
}

/* Card customization */
.card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    color: var(--ck-primary) !important;
    font-size: 1.4rem;
    text-decoration: none;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--ck-dark) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: var(--ck-primary) !important;
    background-color: var(--ck-light);
}

.nav-link.active {
    color: var(--ck-primary) !important;
    background-color: var(--ck-light);
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.nav-dropdown .dropdown-toggle::after {
    margin-left: 0.5rem;
}

.nav-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
    background-color: white;
}

.nav-dropdown .dropdown-item {
    color: var(--ck-dark);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    background: none;
}

.nav-dropdown .dropdown-item:hover,
.nav-dropdown .dropdown-item:focus {
    background-color: var(--ck-light);
    color: var(--ck-primary);
}

.nav-dropdown .dropdown-header {
    color: var(--ck-gray);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem 0.25rem;
    white-space: nowrap;
}

.nav-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(255, 107, 107, 0.1);
}

/* Dark mode support for dropdown */
@media (prefers-color-scheme: dark) {
    .nav-dropdown .dropdown-menu {
        background-color: var(--ck-dark, #2D2D2D);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-dropdown .dropdown-item {
        color: #ffffff;
    }
    
    .nav-dropdown .dropdown-item:hover,
    .nav-dropdown .dropdown-item:focus {
        background-color: #404040;
        color: var(--ck-primary);
    }
    
    .nav-dropdown .dropdown-header {
        color: #cccccc;
    }
    
    .nav-dropdown .dropdown-divider {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Mobile navigation */
@media (max-width: 768px) {
    .nav-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: none;
    }

    .nav-container.show {
        display: flex;
    }

    .navbar-toggler {
        display: block;
    }
}

/* Error UI customization */
#blazor-error-ui {
    background: var(--ck-primary);
    color: white;
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .nav-container {
        z-index: 1000;
    }
}

/* Search page specific styles */
.search-filters {
    position: sticky;
    top: 20px;
}

@media (max-width: 992px) {
    .search-filters {
        position: static;
    }
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--ck-primary) 0%, var(--ck-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}.border-rounded {
    border-radius: 15px !important;
}

/* Image Modal Styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.image-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

.image-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    font-size: 18px;
    transition: all 0.2s ease;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.modal-image {
    max-width: 100%;
    max-height: 95vh;
    height: auto;
    width: auto;
    display: block;
}

.clickable-image {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}/* Navigation arrows */
.image-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    font-size: 20px;
    transition: all 0.2s ease;
}

.image-modal-nav:hover:not(.disabled) {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.image-modal-nav.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-modal-prev {
    left: 20px;
}

.image-modal-next {
    right: 20px;
}

/* Image counter */
.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .image-modal {
        padding: 10px;
    }
    
    .image-modal-content {
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-image {
        max-height: 100vh;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .image-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .image-modal-prev {
        left: 10px;
    }
    
    .image-modal-next {
        right: 10px;
    }
    
    .image-counter {
        bottom: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }
}
