/**
 * Design Improvements & UX Enhancements
 * Modern UI improvements for Zurumi Exchange
 * Created: December 2025
 */

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BUTTON IMPROVEMENTS
   ============================================ */

.btn,
.sitebtn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn:hover,
.sitebtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active,
.sitebtn:active {
    transform: translateY(0);
}

/* Button ripple effect */
.btn::after,
.sitebtn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after,
.sitebtn:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   CARD IMPROVEMENTS
   ============================================ */

.card {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

body.nightmode .card,
body.darkmode .card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   FORM INPUT IMPROVEMENTS
   ============================================ */

.form-control {
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #5D3889;
    box-shadow: 0 0 0 3px rgba(93, 56, 137, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
}

body.nightmode .form-control,
body.darkmode .form-control {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.nightmode .form-control:focus,
body.darkmode .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #8B5CF6;
}

/* ============================================
   TABLE IMPROVEMENTS
   ============================================ */

table {
    border-collapse: separate;
    border-spacing: 0;
}

table thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    color: #6b7280;
    padding: 16px 12px;
    border-bottom: 2px solid #e5e7eb;
}

table tbody tr {
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background: rgba(93, 56, 137, 0.05);
    transform: scale(1.01);
}

table tbody td {
    padding: 16px 12px;
    border-bottom: 1px solid #f3f4f6;
}

body.nightmode table thead th,
body.darkmode table thead th {
    color: #9ca3af;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.nightmode table tbody tr:hover,
body.darkmode table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.nightmode table tbody td,
body.darkmode table tbody td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* ============================================
   NAVIGATION IMPROVEMENTS
   ============================================ */

.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.nightmode .navbar,
body.darkmode .navbar {
    background: rgba(0, 0, 0, 0.8) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #5D3889;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* ============================================
   MODAL IMPROVEMENTS
   ============================================ */

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 20px 24px;
}

body.nightmode .modal-content,
body.darkmode .modal-content {
    background: #1f2937;
    color: #fff;
}

body.nightmode .modal-header,
body.darkmode .modal-header,
body.nightmode .modal-footer,
body.darkmode .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   DROPDOWN IMPROVEMENTS
   ============================================ */

.dropdown-menu {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 8px;
    margin-top: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(93, 56, 137, 0.1);
    color: #5D3889;
    transform: translateX(4px);
}

body.nightmode .dropdown-menu,
body.darkmode .dropdown-menu {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
}

body.nightmode .dropdown-item:hover,
body.darkmode .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

/* ============================================
   BADGE & PILL IMPROVEMENTS
   ============================================ */

.badge {
    border-radius: 6px;
    padding: 4px 10px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ============================================
   LOADING STATES
   ============================================ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.06) 25%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0.06) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

body.nightmode .skeleton,
body.darkmode .skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
}

/* ============================================
   TOOLTIP IMPROVEMENTS
   ============================================ */

.tooltip {
    font-size: 13px;
}

.tooltip-inner {
    background: #1f2937;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SCROLL IMPROVEMENTS
   ============================================ */

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

body.nightmode ::-webkit-scrollbar-track,
body.darkmode ::-webkit-scrollbar-track {
    background: #1f2937;
}

body.nightmode ::-webkit-scrollbar-thumb,
body.darkmode ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

body.nightmode ::-webkit-scrollbar-thumb:hover,
body.darkmode ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

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

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    .card {
        border-radius: 8px;
    }

    .modal-content {
        border-radius: 12px;
    }

    .btn,
    .sitebtn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ============================================
   CRYPTO PRICE STYLING
   ============================================ */

.price-positive {
    color: #22c55e;
    font-weight: 600;
}

.price-negative {
    color: #ef4444;
    font-weight: 600;
}

.price-change-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.price-change-indicator.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.price-change-indicator.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ============================================
   THEME TOGGLE IMPROVEMENTS
   ============================================ */

.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.nightmode .theme-toggle,
body.darkmode .theme-toggle {
    background: #5D3889;
}

body.nightmode .theme-toggle::after,
body.darkmode .theme-toggle::after {
    left: 33px;
}

/* ============================================
   FOCUS VISIBLE FOR ACCESSIBILITY
   ============================================ */

*:focus-visible {
    outline: 2px solid #5D3889;
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}
