/* Mario-Bro Professional Dark Theme */

:root {
    --mario-red: #E52521;
    --mario-blue: #049CD8;
    --mario-yellow: #FBD000;
    --mario-green: #43B047;
    --mario-dark: #0A0E27;
    --mario-darker: #050810;
    --mario-gray: #1E2139;
    --mario-light-gray: #2D3250;
    --mario-text: #E8E9ED;
    --mario-text-secondary: #9EA3B5;
    --mario-border: #3A3F5C;
    --mario-red-gradient: linear-gradient(135deg, #E52521 0%, #B8122A 100%);
}

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

body {
    background: linear-gradient(135deg, var(--mario-darker) 0%, var(--mario-dark) 100%);
    color: var(--mario-text);
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    position: relative;
}

body.modal-open {
    overflow: hidden;
}


/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.02) 2px, rgba(255,255,255,0.02) 4px);
    pointer-events: none;
    z-index: 0;
}

/* Pixel Font */
.pixel-font {
    font-family: 'Press Start 2P', cursive;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Mario Logo */
.mario-logo {
    color: var(--mario-red);
    text-shadow: 
        2px 2px 0 var(--mario-yellow),
        4px 4px 0 rgba(0,0,0,0.3);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.mario-logo:hover {
    transform: scale(1.05);
    text-shadow: 
        2px 2px 0 var(--mario-yellow),
        4px 4px 0 rgba(0,0,0,0.3),
        0 0 20px var(--mario-red);
}

/* Navigation */
.mario-nav {
    background: rgba(10, 14, 39, 0.6);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 3px solid var(--mario-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.mario-nav .nav-link {
    color: var(--mario-text);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.mario-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--mario-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mario-nav .nav-link:hover {
    color: var(--mario-yellow);
}

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

.mario-nav .nav-link.dropdown-toggle::after {
    display: none;
}

/* Dropdown Menu */
.mario-dropdown {
    background: var(--mario-gray);
    border: 2px solid var(--mario-border);
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 0.5rem 0;
}

.mario-dropdown .dropdown-item {
    color: var(--mario-text);
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.mario-dropdown .dropdown-item:hover {
    background: var(--mario-light-gray);
    color: var(--mario-yellow);
    padding-left: 2rem;
}

.mario-dropdown .dropdown-divider {
    border-color: var(--mario-border);
}

/* Language Switcher */
.mario-select {
    background: var(--mario-gray);
    border: 2px solid var(--mario-border);
    color: var(--mario-text);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mario-select:focus {
    background: var(--mario-light-gray);
    border-color: var(--mario-red);
    box-shadow: 0 0 0 0.2rem rgba(229, 37, 33, 0.25);
}

.mario-select option {
    background: var(--mario-gray);
    color: var(--mario-text);
}

/* Main Content */
.mario-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn-mario-primary {
    background: rgba(229, 37, 33, 0.35);
    border: 1px solid rgba(229, 37, 33, 0.6);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 22px rgba(229, 37, 33, 0.35);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.btn-mario-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(229, 37, 33, 0.6);
    background: rgba(229, 37, 33, 0.5);
    border-color: rgba(229, 37, 33, 0.8);
}

.btn-mario-secondary {
    background: rgba(229, 37, 33, 0.28);
    border: 1px solid rgba(229, 37, 33, 0.5);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(229, 37, 33, 0.3);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.btn-mario-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(229, 37, 33, 0.5);
    background: rgba(229, 37, 33, 0.45);
    border-color: rgba(229, 37, 33, 0.75);
}

/* Cards */
.mario-card {
    background: var(--mario-gray);
    border: 2px solid var(--mario-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mario-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border-color: var(--mario-red);
}

.mario-card-header {
    background: var(--mario-light-gray);
    border-bottom: 2px solid var(--mario-border);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--mario-yellow);
}

/* Product Cards */
.product-card {
    cursor: pointer;
    overflow: visible;
    position: relative;
}

.product-card-row {
    align-items: stretch;
    justify-content: center;
}

.product-card-col {
    display: flex;
}

.product-card-col .product-card {
    width: 100%;
    height: 100%;
}

.product-card.mario-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    border-color: var(--mario-red);
}

.product-card__front {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    height: 100%;
    justify-content: space-between;
}

.product-card__image {
    display: block;
    width: var(--card-image-scale, 92%);
    height: var(--card-image-scale, 92%);
    object-fit: contain;
    object-position: center;
    border-radius: 30px !important;
    clip-path: inset(0 round 30px) !important;
    overflow: hidden;
    border: none;
    box-shadow: none;
    transition: transform 0.35s ease;
}

.product-card__image--expanded {
    width: var(--card-image-scale, 92%);
    height: var(--card-image-scale, 92%);
}

.product-card__image-frame {
    width: 100%;
    height: 220px;
    border-radius: 30px !important;
    overflow: hidden !important;
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-mask-image: radial-gradient(white, white);
    mask-image: radial-gradient(white, white);
}

.product-card__image-frame::before {
    content: '';
    position: absolute;
    width: var(--card-image-scale, 92%);
    height: var(--card-image-scale, 92%);
    top: 50%;
    left: 50%;
    background-image: var(--card-image);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(9px);
    transform: translate(-50%, -50%);
    opacity: 0.85;
    z-index: 0;
}

.product-card__image-frame--expanded {
    height: 360px;
    --card-image-scale: 92%;
}

.product-card__image-frame img {
    border-radius: 30px !important;
    clip-path: inset(0 round 30px) !important;
    -webkit-mask-image: radial-gradient(white, white);
    mask-image: radial-gradient(white, white);
    position: relative;
    z-index: 1;
}

.product-card__title {
    color: var(--mario-yellow);
    margin: 0;
    text-align: center;
}

.product-card__summary {
    color: var(--mario-text-secondary);
    margin: 0;
    line-height: 1.6;
    max-width: 90%;
}

.product-card__hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--mario-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-card__details {
    display: none;
}

.product-card__subtitle {
    color: var(--mario-yellow);
    margin: 1.5rem 0 0.75rem;
    text-align: center;
}

.product-card__text {
    color: var(--mario-text);
    line-height: 1.7;
}

.product-card__scroll {
    display: none;
}

.product-card__actions {
    margin-top: 1.5rem;
}

.product-card__buy {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: telegram-pulse 2.4s ease-in-out infinite, telegram-bounce 1.8s infinite;
    filter: drop-shadow(0 10px 18px rgba(229, 37, 33, 0.45));
}

.product-card__buy i {
    font-size: 1.35em;
    line-height: 1;
}

.product-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(80, 80, 90, 0.28);
    backdrop-filter: blur(6px) saturate(110%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99999;
}

.product-card__modal {
    position: relative;
    width: min(72vw, 820px);
    height: auto;
    max-height: 80vh;
    overflow: visible;
    background: var(--mario-gray);
    border: 2px solid var(--mario-red);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 40px rgba(229, 37, 33, 0.35);
    opacity: 0;
    transform: scale(0.96);
    transition: transform 0.35s ease, opacity 0.35s ease, box-shadow 0.35s ease;
}

.product-card__modal-content {
    overflow: visible;
    padding-right: 0.75rem;
}

.product-card__modal-scroll {
    max-height: calc(80vh - 6rem);
    overflow-y: auto;
    padding-right: 0.75rem;
    padding-bottom: 1rem;
}

.product-card__close {
    position: absolute;
    top: 12px;
    right: 26px;
    transform: none;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--mario-red-gradient);
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(229, 37, 33, 0.35);
    z-index: 2;
}

.product-card__overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.product-card__overlay.is-open .product-card__modal {
    opacity: 1;
    transform: scale(1);
    animation: modal-glow 2.6s ease-in-out infinite;
}

@keyframes modal-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes modal-glow {
    0%, 100% { box-shadow: 0 20px 40px rgba(229, 37, 33, 0.35), 0 0 24px rgba(229, 37, 33, 0.25); }
    50% { box-shadow: 0 24px 48px rgba(229, 37, 33, 0.45), 0 0 36px rgba(229, 37, 33, 0.4); }
}

/* Alerts */
.mario-alert {
    border-radius: 8px;
    border: 2px solid;
    font-weight: 500;
}

.mario-alert.alert-success {
    background: rgba(67, 176, 71, 0.1);
    border-color: var(--mario-green);
    color: var(--mario-green);
}

.mario-alert.alert-danger {
    background: rgba(229, 37, 33, 0.1);
    border-color: var(--mario-red);
    color: var(--mario-red);
}

.mario-alert.alert-info {
    background: rgba(4, 156, 216, 0.1);
    border-color: var(--mario-blue);
    color: var(--mario-blue);
}

/* Footer */
.mario-footer {
    background: var(--mario-darker);
    border-top: 3px solid var(--mario-border);
    color: var(--mario-text-secondary);
    position: relative;
    z-index: 1;
}

.mario-footer h5, .mario-footer h6 {
    color: var(--mario-yellow);
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--mario-text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: var(--mario-yellow);
    padding-left: 10px;
}

/* Forms */
.form-control, .form-select {
    background: var(--mario-gray);
    border: 2px solid var(--mario-border);
    color: var(--mario-text);
    padding: 0.75rem;
    border-radius: 4px;
}

.form-control:focus, .form-select:focus {
    background: var(--mario-light-gray);
    border-color: var(--mario-red);
    color: var(--mario-text);
    box-shadow: 0 0 0 0.2rem rgba(229, 37, 33, 0.25);
}

.form-control::placeholder {
    color: var(--mario-text-secondary);
}

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

::-webkit-scrollbar-track {
    background: var(--mario-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--mario-gray);
    border-radius: 6px;
    border: 2px solid var(--mario-darker);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mario-red);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 6px rgba(229, 37, 33, 0.5); }
    50% { box-shadow: 0 0 20px rgba(229, 37, 33, 0.75), 0 0 32px rgba(229, 37, 33, 0.4); }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .mario-logo {
        font-size: 0.9rem;
    }
    
    .mario-card {
        padding: 1rem;
    }
    
    .pixel-font {
        font-size: 0.7rem;
    }
}

/* Telegram Float Button */
.telegram-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 72px;
    height: 72px;
    background: rgba(229, 37, 33, 0.4);
    border: 1px solid rgba(229, 37, 33, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(229, 37, 33, 0.45);
    transition: all 0.3s ease;
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    z-index: 9999;
    text-decoration: none;
}

.telegram-pulse {
    animation: telegram-pulse 2.4s ease-in-out infinite, telegram-bounce 1.8s infinite;
}

.telegram-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 34px rgba(229, 37, 33, 0.65);
    background: rgba(229, 37, 33, 0.55);
    border-color: rgba(229, 37, 33, 0.85);
    color: white;
}

.telegram-float .telegram-tooltip {
    position: absolute;
    left: 75px;
    background: var(--mario-gray);
    color: var(--mario-text);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid var(--mario-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.telegram-float .telegram-tooltip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: var(--mario-border);
}

.telegram-float:hover .telegram-tooltip {
    opacity: 1;
    visibility: visible;
    left: 80px;
}

@keyframes telegram-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(229, 37, 33, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(229, 37, 33, 0.7);
        transform: scale(1.08);
    }
}

@keyframes telegram-bounce {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-6px);
        animation-timing-function: ease-out;
    }
    40% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.3, 0, 0.2, 1);
    }
    55% {
        transform: translateY(-3px);
        animation-timing-function: ease-out;
    }
    70%, 100% {
        transform: translateY(0);
        animation-timing-function: ease-in;
    }
}

/* Utility Classes */
.text-mario-red { color: var(--mario-red); }
.text-mario-blue { color: var(--mario-blue); }
.text-mario-yellow { color: var(--mario-yellow); }
.text-mario-yellow,
.product-card__title,
.product-card__subtitle,
.pixel-font {
    text-shadow: 0 2px 8px rgba(229, 37, 33, 0.35);
}
.text-mario-green { color: var(--mario-green); }

.bg-mario-dark { background: var(--mario-dark); }
.bg-mario-gray { background: var(--mario-gray); }

.border-mario { border-color: var(--mario-border); }
.border-mario-red { border-color: var(--mario-red); }
