/* ============================================
   Koleksiyonum — Modern Light Theme CSS
   Dursun Efe Aydın | No: 339 | 11/A
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #f4f6fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9ff;
    --bg-glass: rgba(255, 255, 255, 0.88);

    --accent-primary: #6366f1;
    --accent-secondary: #818cf8;
    --accent-light: #e0e7ff;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
    --accent-glow: 0 4px 20px rgba(99, 102, 241, 0.25);

    --text-primary: #1e1b4b;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    --border-color: #e5e7eb;
    --border-hover: rgba(99, 102, 241, 0.4);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --success: #059669;
    --success-bg: #ecfdf5;
    --warning: #d97706;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 4px 24px rgba(99, 102, 241, 0.12);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(167, 139, 250, 0.04) 0%, transparent 50%);
}

main {
    flex: 1;
}

/* --- Navbar --- */
.navbar {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.7rem 0;
    z-index: 1000;
    box-shadow: var(--shadow-xs);
}

.navbar-logo {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    transition: var(--transition);
}

.navbar-logo:hover {
    transform: rotate(5deg) scale(1.1);
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--accent-primary) !important;
    background: var(--accent-light);
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar .nav-link:hover::after {
    width: 50%;
}

.navbar-toggler {
    border: 1px solid var(--border-color) !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- Hero Section --- */
.hero-section {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    position: relative;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* --- Action Bar (Search + Add Button) --- */
.action-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.search-icon {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--accent-primary);
    font-size: 1.05rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-input {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-left: none !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem;
    padding: 0.6rem 1rem;
    transition: var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    box-shadow: none !important;
    border-color: var(--accent-primary) !important;
}

.btn-search {
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: var(--accent-glow);
    color: white;
}

.btn-clear {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
    font-weight: 500;
    transition: var(--transition);
}

.btn-clear:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-add-new {
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.btn-add-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--accent-glow), var(--shadow-md);
    color: white;
}

/* --- Search Info --- */
.search-info {
    color: var(--text-secondary);
    background: var(--accent-light);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--accent-primary);
    font-size: 0.9rem;
}

/* --- Stats Bar --- */
.stats-bar {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Collection Cards --- */
.collection-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out both;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.collection-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.card-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ddd6fe 100%);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.collection-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #ddd6fe 100%);
    font-size: 4rem;
    color: var(--accent-secondary);
    opacity: 0.7;
}

.card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: var(--shadow-xs);
}

.card-body-custom {
    padding: 1.25rem;
    flex: 1;
}

.card-title-custom {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.meta-item i {
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
}

.status-yeni {
    background: #ecfdf5;
    color: var(--success);
}

.status-iyi-durumda {
    background: #fffbeb;
    color: var(--warning);
}

.status-yipranmis {
    background: #fef2f2;
    color: var(--danger);
}

/* Card Actions */
.card-actions {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: #fafbff;
}

.btn-delete-trigger {
    background: transparent;
    border: 1px solid #fecaca;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.btn-delete-trigger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* --- Empty State --- */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.empty-state-content {
    text-align: center;
    padding: 3rem;
    max-width: 500px;
}

.empty-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--accent-secondary);
    border: 2px dashed #c7d2fe;
    animation: pulse 2.5s infinite;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- Glass Alert --- */
.glass-alert {
    background: var(--success-bg);
    border: 1px solid #a7f3d0;
    color: var(--success);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.glass-alert .btn-close {
    filter: none;
    opacity: 0.5;
}

/* --- Modal --- */
.glass-modal {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg);
}

.glass-modal .modal-title {
    color: var(--text-primary);
    font-weight: 700;
}

.glass-modal .modal-body {
    color: var(--text-secondary);
}

.glass-modal .modal-body strong {
    color: var(--text-primary);
}

.btn-close-white {
    filter: none !important;
}

.btn-cancel {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

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

.btn-confirm-delete {
    background: var(--danger);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-confirm-delete:hover {
    background: var(--danger-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

/* --- Create Form Styles --- */
.form-header {
    animation: fadeInUp 0.5s ease-out;
}

.btn-back {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
}

.btn-back:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
    border-color: var(--border-hover);
}

.form-title {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.form-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    animation: fadeInUp 0.5s ease-out 0.15s both;
    box-shadow: var(--shadow-md);
}

.form-label-custom {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label-custom i {
    color: var(--accent-primary);
}

.custom-input {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.65rem 1rem !important;
    font-size: 0.95rem !important;
    transition: var(--transition) !important;
}

.custom-input::placeholder {
    color: var(--text-muted) !important;
}

.custom-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12) !important;
    background: #fff !important;
}

.custom-input option {
    background: white;
    color: var(--text-primary);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 120px;
}

.radio-input {
    display: none;
}

.radio-label {
    display: block;
    text-align: center;
    padding: 0.65rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
}

.radio-label:hover {
    border-color: var(--border-hover);
    color: var(--accent-primary);
    background: #eef2ff;
}

.radio-input:checked + .radio-label {
    background: var(--accent-light);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

.validation-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
}

.form-actions {
    display: flex;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-submit {
    background: var(--accent-gradient);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.7rem 2rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--accent-glow), var(--shadow-md);
    color: white;
}

.btn-cancel-form {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
}

.btn-cancel-form:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: #d1d5db;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-logo {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: contain;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.developer-info {
    margin-bottom: 0.25rem;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border: 1px solid #c7d2fe;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.dev-badge i {
    color: var(--accent-primary);
}

.dev-badge strong {
    color: var(--text-primary);
}

.dev-separator {
    color: #c7d2fe;
    margin: 0 0.25rem;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0;
}

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

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

/* Stagger animation for cards */
.col-lg-4:nth-child(1) .collection-card { animation-delay: 0.1s; }
.col-lg-4:nth-child(2) .collection-card { animation-delay: 0.2s; }
.col-lg-4:nth-child(3) .collection-card { animation-delay: 0.3s; }
.col-lg-4:nth-child(4) .collection-card { animation-delay: 0.4s; }
.col-lg-4:nth-child(5) .collection-card { animation-delay: 0.5s; }
.col-lg-4:nth-child(6) .collection-card { animation-delay: 0.6s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .form-card {
        padding: 1.25rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .dev-badge {
        font-size: 0.78rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
    }

    .stat-card {
        padding: 0.75rem;
    }

    .stat-number {
        font-size: 1rem;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* --- Selection --- */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}