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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #0a0a0a;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.2) 0%, transparent 50%);
    min-height: 100vh;
    color: #e0e0e0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Баннер для оформления нового сертификата */
.create-certificate-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 15px;
    padding: 15px 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeInDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.banner-text {
    font-size: 16px;
    color: #e0e0e0;
    margin: 0;
}

.banner-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.banner-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Контейнер подарочной коробки */
.gift-box-container {
    position: relative;
    width: 500px;
    height: 450px;
    max-width: 90vw;
    perspective: 1500px;
    cursor: pointer;
    margin: 0 auto;
}

/* Подарочная коробка */
.gift-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s;
}

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

/* Бантик - простой и надежный */
.gift-bow {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 100px;
    z-index: 5;
    pointer-events: none;
}

.bow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    background: #dc143c;
    border-radius: 50%;
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.6),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.bow-loop {
    position: absolute;
    top: 0;
    width: 60px;
    height: 75px;
    background: #dc143c;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.bow-loop-left {
    left: 10px;
    transform: rotate(-20deg);
}

.bow-loop-right {
    right: 10px;
    transform: rotate(20deg);
}

.bow-ribbon {
    position: absolute;
    top: 75px;
    width: 10px;
    height: 250px;
    background: #dc143c;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.4);
}

.bow-ribbon-left {
    left: 40px;
    transform: rotate(-1deg);
}

.bow-ribbon-right {
    right: 40px;
    transform: rotate(1deg);
}

.bow-ribbon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #dc143c;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Крышка коробки */
.gift-box-lid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 3px solid rgba(102, 126, 234, 0.4);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    transform-origin: bottom center;
    transform: rotateX(0deg);
    transition: transform 0.9s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 3;
    box-shadow: 
        0 -5px 25px rgba(0, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.4),
        0 0 50px rgba(102, 126, 234, 0.2),
        inset 0 0 20px rgba(118, 75, 162, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    backface-visibility: hidden;
}

.gift-box-lid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: shimmer 3s infinite;
}

.gift-box-lid.opening {
    transform: rotateX(-160deg) translateY(-20px);
}

.lid-text {
    font-size: 48px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 255, 255, 0.2);
    letter-spacing: 10px;
    z-index: 10;
    position: relative;
}

/* Тело коробки */
.gift-box-body {
    position: absolute;
    top: 200px;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(145deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    border: 3px solid rgba(102, 126, 234, 0.4);
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 80px rgba(102, 126, 234, 0.2),
        inset 0 0 40px rgba(118, 75, 162, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    overflow: hidden;
}

.box-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: pulse 2s infinite;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Сертификат внутри коробки (изначально скрыт) */
.certificate-inside {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%) translateY(0) scale(0.7);
    width: 85%;
    max-width: 900px;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    pointer-events: none;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: visible;
}

.certificate-inside.pulling-out {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-400px) scale(1);
    z-index: 10;
    pointer-events: all;
}

/* Сертификат */
.certificate-card {
    background: linear-gradient(135deg, rgb(250, 201, 201) 0%, rgb(245, 180, 180) 50%, rgb(240, 160, 160) 100%); /* Фирменный розовый цвет по умолчанию */
    border-radius: 12px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    min-height: 500px;
    transition: background 0.3s ease;
}

/* Водяной знак */
.watermark {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.08);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    letter-spacing: 10px;
    user-select: none;
    pointer-events: none;
    z-index: 1;
}

/* Контент сертификата */
.certificate-content {
    width: 70%;
    margin-left: 30%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.certificate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.logo-underline {
    width: 60px;
    height: 2px;
    background: #ffffff;
}

.cert-number-header {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.certificate-title-section {
    margin-bottom: 30px;
}

.cert-title-small {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 5px;
}

.cert-title-large {
    font-size: 42px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.recipient-section {
    margin-bottom: 30px;
}

.recipient-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.recipient-name {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
}

.gift-message {
    margin-bottom: 30px;
}

.gift-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 15px;
}

.gift-service-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.certificate-design-icon {
    font-size: 48px;
    line-height: 1;
    display: none;
}

.gift-service {
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 1px;
}

.gift-amount {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-online {
    flex: 1;
    padding: 18px 30px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-online:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.btn-whatsapp {
    width: 60px;
    height: 60px;
    padding: 0;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background: #25D366;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp svg {
    width: 28px;
    height: 28px;
}

/* Футер сертификата */
.certificate-footer {
    margin-top: auto;
}

.validity-info {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.terms-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Финальное положение сертификата */
.certificate-final {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Информационная секция */
.info-section {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    animation: fadeIn 1s ease-out 2s both;
    opacity: 0;
}

.info-section.show {
    opacity: 1;
    animation: fadeIn 1s ease-out;
}

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

.info-card,
.contacts-card {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.info-title,
.contacts-title {
    font-size: 24px;
    color: #d4af37;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.info-content {
    color: #e0e0e0;
    line-height: 1.8;
}

.info-text {
    margin-bottom: 15px;
    font-size: 16px;
}

.warning-box {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
}

.warning-text {
    color: #ffc107;
    font-weight: 600;
    text-align: center;
}

.contacts-content {
    color: #e0e0e0;
}

.contact-item {
    margin-bottom: 15px;
    font-size: 16px;
}

.contact-item a {
    color: #d4af37;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #f4e4bc;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.social-links {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.social-link {
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.2);
    color: #d4af37;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.social-link:hover {
    background: rgba(102, 126, 234, 0.3);
    color: #f4e4bc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.address-item {
    margin-top: 20px;
}

.addresses-list {
    list-style: none;
    margin-top: 10px;
    padding-left: 0;
}

.addresses-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    font-size: 15px;
}

.addresses-list li::before {
    content: "📍";
    position: absolute;
    left: 0;
}

.page-footer {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 60px;
    width: 100%;
    max-width: 1200px;
    opacity: 0;
}

.page-footer.show {
    opacity: 1;
    animation: fadeIn 1s ease-out;
}

.footer-small {
    font-size: 12px;
    margin: 10px 0;
    color: #666;
}

.footer-disclaimer {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gift-box-container {
        width: 90vw;
        height: 400px;
    }

    .gift-box-lid {
        height: 150px;
    }

    .gift-box-body {
        top: 150px;
        height: 200px;
    }

    .lid-text {
        font-size: 36px;
        letter-spacing: 6px;
    }

    .gift-bow {
        width: 100px;
        height: 60px;
        top: -20px;
    }

    .certificate-card {
        flex-direction: column;
        min-height: auto;
    }

    .watermark {
        width: 100%;
        height: 100px;
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 48px;
        opacity: 0.05;
    }

    .certificate-content {
        width: 100%;
        margin-left: 0;
        padding: 30px 20px;
    }

    .cert-title-large {
        font-size: 32px;
    }

    .recipient-name {
        font-size: 24px;
    }

    .gift-service {
        font-size: 28px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-whatsapp {
        width: 100%;
    }

    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lid-text {
        font-size: 28px;
    }

    .cert-title-large {
        font-size: 24px;
    }

    .recipient-name {
        font-size: 20px;
    }

    .gift-service {
        font-size: 22px;
    }
}
