/* Modern Beautiful Design - 2024 */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --info-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --shadow-hover: 0 15px 45px 0 rgba(31, 38, 135, 0.5);
}

/* Global Styles */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark background for purchases page */
body.purchases-page {
    background: #1a1a2e !important;
    background-image: none !important;
    background-attachment: fixed !important;
    animation: none !important;
    background-size: 100% 100% !important;
}

body.purchases-page * {
    background-image: none !important;
}

html body.purchases-page,
html.purchases-page body {
    background: #1a1a2e !important;
    background-image: none !important;
}

/* Ensure all elements on purchases page have dark theme */
body.purchases-page .container-fluid {
    background: transparent !important;
    background-image: none !important;
}

body.purchases-page .card-block {
    background: rgba(30, 30, 50, 0.8) !important;
    background-image: none !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

body.purchases-page #wrapper {
    background: transparent !important;
    background-image: none !important;
}

body.purchases-page #content-wrapper {
    background: transparent !important;
    background-image: none !important;
}

body.purchases-page #content {
    background: transparent !important;
    background-image: none !important;
}

body.purchases-page .row {
    background: transparent !important;
    background-image: none !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Disable gradient animation on purchases page */
body.purchases-page,
body.purchases-page::before,
body.purchases-page::after {
    animation: none !important;
}

/* Glassmorphism Cards */
.card, .card-body {
    background: rgba(30, 30, 50, 0.4) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover::before {
    opacity: 1;
}

.card:hover, .card-body:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
}

/* Modern Topbar */
.topbar {
    background: rgba(30, 30, 50, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    border-radius: 0 0 20px 20px;
    margin-bottom: 2rem !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(102, 126, 234, 0.3);
    transition: left 0.3s ease;
    z-index: -1;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
    background: rgba(102, 126, 234, 0.4);
}

/* Dropdown Menu */
.dropdown-menu {
    background: rgba(30, 30, 50, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

.dropdown-item {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    transform: translateX(5px);
}

/* Statistics Cards */
.col-xl-3 .card-body {
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem !important;
    position: relative;
    overflow: hidden;
}

.col-xl-3 .card-body::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.text-primary {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.h5 {
    color: #fff !important;
    font-weight: 700;
    font-size: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.text-gray-300 {
    color: rgba(255, 255, 255, 0.7) !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Wave Animation */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1));
    border-radius: 0 0 20px 20px;
    animation: waveAnimation 3s ease-in-out infinite;
    pointer-events: none;
}

.wave:nth-child(2) {
    animation-delay: 0.5s;
    opacity: 0.7;
}

.wave:nth-child(3) {
    animation-delay: 1s;
    opacity: 0.5;
}

@keyframes waveAnimation {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(-10px) scaleY(1.1); }
}

/* News Cards */
.content-wrapper {
    margin: 0 auto;
    max-width: 100%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    padding: 1rem;
    gap: 1.5rem;
}

.news-card {
    border: 0 solid transparent;
    margin: 0;
    position: relative;
    height: 12rem;
    overflow: hidden;
    border-radius: 20px !important;
    flex: 1;
    min-width: 290px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    background: rgba(30, 30, 50, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media(min-width: 900px) {
    .news-card {
        height: 20rem;
    }
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-card:hover::before {
    opacity: 1;
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
}

.news-card__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: relative;
    z-index: 0;
}

.news-card:hover .news-card__image {
    transform: scale(1.15);
    z-index: -1;
}

.news-card__text-wrapper {
    position: absolute;
    bottom: 0;
    padding: 1.5rem;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    width: 100%;
}

.news-card__title {
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

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

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.h3 {
    color: #fff !important;
    font-weight: 700;
}

/* Buttons */
.btn {
    border-radius: 12px !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.btn::before {
    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:hover::before {
    width: 300px;
    height: 300px;
}

/* Forms */
.form-control {
    border-radius: 12px !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control:focus {
    background: rgba(30, 30, 50, 0.7) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
}

/* Modal */
.modal-content {
    background: rgba(30, 30, 50, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 20px 20px 0 0;
}

.modal-title {
    color: #fff !important;
    font-weight: 700;
}

.modal-body {
    color: rgba(255, 255, 255, 0.9) !important;
}

.modal-body label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.modal-body .form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
}

.modal-body .form-control:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
}

.modal-body .form-select {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
}

.modal-body .form-select:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.5) !important;
}

.close {
    color: rgba(255, 255, 255, 0.8) !important;
    opacity: 0.8;
}

.close:hover {
    color: #fff !important;
    opacity: 1;
}

/* Container */
.container-fluid {
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    background: rgba(30, 30, 50, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(102, 126, 234, 0.3) !important;
}

/* Text Colors */
.text-gray-800 {
    color: rgba(255, 255, 255, 0.95) !important;
}

.text-gray-600 {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Alerts */
.alert {
    border-radius: 15px !important;
    border: none !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-info {
    background: rgba(79, 172, 254, 0.2) !important;
    color: #fff !important;
    border-left: 4px solid #4facfe !important;
}

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

::-webkit-scrollbar-track {
    background: rgba(30, 30, 50, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .card, .card-body {
        border-radius: 15px !important;
    }
    
    .news-card {
        min-width: 100%;
    }
    
    .container-fluid {
        padding: 1rem;
    }
}

/* Icon Animations */
.fas, .fa {
    transition: transform 0.3s ease;
}

.nav-link:hover .fas,
.nav-link:hover .fa {
    transform: scale(1.2) rotate(5deg);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.card-body {
    background-size: 1000px 100%;
    animation: shimmer 3s infinite linear;
}

/* User Profile Dropdown */
.img-profile {
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.img-profile:hover {
    border-color: rgba(255, 255, 255, 0.6) !important;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Стили для выбранного аватара */
.img-profile.avatar-selected {
    border: 3px solid #1CC88A !important;
    box-shadow: 0 0 15px rgba(28, 200, 138, 0.7) !important;
    outline: 2px solid #1CC88A !important;
    outline-offset: 2px !important;
    transform: scale(1.05);
}

.avatar-button-selected {
    border: 2px solid #1CC88A !important;
    box-shadow: 0 0 20px rgba(28, 200, 138, 0.8) !important;
    outline: 1px solid #1CC88A !important;
    background-color: rgba(28, 200, 138, 0.1) !important;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Login/Registration Pages */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    background-attachment: fixed;
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

.bg-login-image,
.bg-register-image {
    background-position: center !important;
    background-size: cover !important;
    position: relative;
    overflow: hidden;
}

.bg-login-image::before,
.bg-register-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    backdrop-filter: blur(2px);
}

.card.o-hidden {
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 25px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
}

.text-blue-900 {
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-title {
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
}

.form-control-user {
    border-radius: 12px !important;
    border: 2px solid rgba(102, 126, 234, 0.3) !important;
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(10px);
    color: #fff !important;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-user::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-control-user:focus {
    background: rgba(30, 30, 50, 0.7) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
}

.btn-user {
    border-radius: 12px !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-facebook {
    background: linear-gradient(135deg, #4c6ef5 0%, #364fc7 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(76, 110, 245, 0.4);
}

.btn-facebook:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 110, 245, 0.6);
    color: #fff !important;
}

.custom-control-label {
    color: rgba(255, 255, 255, 0.9) !important;
}

.small {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
}

.small:hover {
    color: #fff !important;
    text-decoration: none !important;
}

a.small {
    text-decoration: none;
}

a.small:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Shop Cards */
.card-link {
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 15px !important;
    transition: all 0.3s ease;
    color: #fff !important;
    text-decoration: none !important;
}

.card-link:hover {
    background: rgba(30, 30, 50, 0.7) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.card-link .description {
    color: rgba(255, 255, 255, 0.9) !important;
}

.card-link .description span {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card-header {
    background: rgba(30, 30, 50, 0.6) !important;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3) !important;
    color: #fff !important;
}

.card-header .text-primary {
    color: rgba(255, 255, 255, 0.9) !important;
}

.card.shadow {
    background: rgba(30, 30, 50, 0.5) !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Card Block Styles */
.card-block {
    background: rgba(30, 30, 50, 0.5) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    border-radius: 20px !important;
    transition: all 0.3s ease;
}

.card-block:hover {
    background: rgba(30, 30, 50, 0.7) !important;
    border-color: rgba(102, 126, 234, 0.6) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4) !important;
}

.card-block-image img {
    border-radius: 15px;
}

.card-block-title {
    color: rgba(255, 255, 255, 0.9) !important;
}

.card-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: #fff !important;
}

.card-btn-accent {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.card-btn-accent:hover {
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.6);
}

