/**
 * Premium Frontend Styles for Coupon & Promo Code Plugin
 * Modern, luxurious, and professional design
 */

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Modern coupon site colors inspired by the samples */
    --cpc-primary-gradient: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    --cpc-secondary-gradient: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    --cpc-success-gradient: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --cpc-warning-gradient: linear-gradient(135deg, #ff8c00 0%, #ff6b35 100%);
    --cpc-dark-gradient: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    --cpc-light-gradient: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    
    /* Enhanced shadows for modern look */
    --cpc-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --cpc-shadow-medium: 0 8px 32px rgba(74, 144, 226, 0.25);
    --cpc-shadow-bold: 0 12px 40px rgba(74, 144, 226, 0.35);
    --cpc-shadow-glow: 0 0 20px rgba(74, 144, 226, 0.3);
    --cpc-shadow-red: 0 4px 15px rgba(245, 101, 101, 0.4);
    --cpc-shadow-orange: 0 4px 15px rgba(255, 107, 53, 0.4);
    
    --cpc-border-radius: 16px;
    --cpc-border-radius-small: 12px;
    --cpc-border-radius-large: 20px;
    
    --cpc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --cpc-transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BASE STYLES === */
.cpc-coupon {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin-bottom: 28px;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: var(--cpc-border-radius);
    overflow: hidden;
    transition: var(--cpc-transition);
    transform: translateY(0);
    will-change: transform, box-shadow;
}

.cpc-coupon * {
    box-sizing: border-box;
}

/* === PREMIUM COUPON DESIGN === */
.cpc-coupon-coupon {
    background: var(--cpc-primary-gradient);
    position: relative;
    box-shadow: var(--cpc-shadow-medium);
    transition: var(--cpc-transition);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.cpc-coupon-coupon:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--cpc-shadow-bold), var(--cpc-shadow-glow);
}

/* Premium glass morphism effect */
.cpc-coupon-coupon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.15) 0%, 
        rgba(255,255,255,0.05) 25%,
        transparent 50%,
        rgba(255,255,255,0.05) 75%,
        rgba(255,255,255,0.15) 100%);
    pointer-events: none;
    border-radius: var(--cpc-border-radius);
}

/* Animated border glow */
.cpc-coupon-coupon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, #667eea, #764ba2, #f093fb, #667eea);
    border-radius: var(--cpc-border-radius-large);
    z-index: -1;
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: var(--cpc-transition);
}

.cpc-coupon-coupon:hover::after {
    opacity: 0.7;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cpc-coupon-inner {
    padding: 32px;
    color: white;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--cpc-border-radius);
}

.cpc-coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.cpc-store-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
    position: relative;
    padding-left: 20px;
}

.cpc-store-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}

.cpc-discount-badge {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cpc-discount-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cpc-coupon-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 12px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.cpc-coupon-description {
    font-size: 16px;
    margin: 0 0 24px 0;
    opacity: 0.95;
    line-height: 1.6;
    font-weight: 400;
}

.cpc-coupon-code-section {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    border-radius: var(--cpc-border-radius-small);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.cpc-coupon-code-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
}

/* === HIDDEN/REVEALED CODE STATES === */
.cpc-code-display {
    width: 100%;
    text-align: center;
    transition: var(--cpc-transition);
}

/* Hidden state (default) - like "Get Code" buttons in samples */
.cpc-code-hidden {
    cursor: pointer;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 28px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    transition: var(--cpc-transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 2px solid transparent;
}

.cpc-code-hidden::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--cpc-transition-fast);
}

.cpc-code-hidden:hover {
    background: linear-gradient(135deg, #357abd 0%, #2968a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.6);
}

.cpc-code-hidden:hover::before {
    left: 100%;
}

/* Revealed state - shows actual code */
.cpc-code-revealed {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border: 2px solid #38a169;
    border-radius: 12px;
    padding: 16px 20px;
    animation: revealCode 0.5s ease-out;
    position: relative;
}

.cpc-code-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.8;
    letter-spacing: 1px;
    white-space: nowrap;
}

@keyframes revealCode {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hidden code text styling */
.cpc-code-hidden .cpc-code-value {
    font-size: 16px;
    font-weight: 700;
    color: white;
    margin: 0;
    letter-spacing: 1px;
}

.cpc-code-hidden .cpc-code-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    margin-bottom: 4px;
}

/* Revealed code styling */
.cpc-code-revealed .cpc-code-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    color: white;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    user-select: all;
    margin: 8px 0;
    position: relative;
}

.cpc-code-revealed .cpc-code-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.cpc-code-success-message {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 8px;
    display: none;
    font-weight: 600;
}

.cpc-code-revealed .cpc-code-success-message {
    display: block;
    animation: fadeIn 0.3s ease-in 0.2s both;
}

.cpc-code-value::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: highlight 3s infinite;
}

@keyframes highlight {
    0%, 90%, 100% { left: -100%; }
    45% { left: 100%; }
}

.cpc-copy-button {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    color: #fff;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--cpc-transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
    outline: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    backdrop-filter: blur(20px);
}

.cpc-copy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--cpc-transition-fast);
}

.cpc-copy-button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cpc-copy-button:hover::before {
    left: 100%;
}

.cpc-copy-button:active {
    transform: translateY(0) scale(1);
}

.cpc-expiry-date {
    font-size: 13px;
    opacity: 0.85;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpc-expiry-date::before {
    content: '⏰';
    font-size: 14px;
}

.cpc-coupon-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

.cpc-shop-button {
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border: none;
    border-radius: 30px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--cpc-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.cpc-shop-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: var(--cpc-transition-fast);
}

.cpc-shop-button:hover {
    background: white;
    color: #5a67d8;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.cpc-shop-button:hover::before {
    left: 100%;
}

.cpc-shop-button::after {
    content: '→';
    transition: var(--cpc-transition-fast);
}

.cpc-shop-button:hover::after {
    transform: translateX(4px);
}

/* === PREMIUM PROMO CODE DESIGN === */
.cpc-coupon-promo {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: var(--cpc-border-radius);
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: var(--cpc-transition);
    overflow: hidden;
}

.cpc-coupon-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.cpc-promo-inner {
    padding: 24px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 120px;
}

.cpc-promo-header {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
    width: 100%;
}

/* === PROMO DISCOUNT DISPLAY (LEFT SIDE) === */
.cpc-promo-discount-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    text-align: center;
    flex-shrink: 0;
    padding: 16px;
    border-right: 2px dashed #e5e7eb;
    margin-right: 24px;
}

.cpc-discount-main {
    font-size: 32px;
    font-weight: 900;
    color: #4a90e2;
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.cpc-discount-text {
    font-size: 14px;
    font-weight: 600;
    color: #4a90e2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === STORE LOGO/BRAND === */
.cpc-store-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
}

/* === PROMO INFO SECTION (MIDDLE) === */
.cpc-promo-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cpc-promo-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
    letter-spacing: -0.025em;
}

.cpc-promo-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px 0;
    line-height: 1.5;
    font-weight: 400;
}

.cpc-promo-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.cpc-promo-verification {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
}

.cpc-promo-verification::before {
    content: '✓';
    color: #10b981;
    font-weight: 900;
}

.cpc-promo-usage {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.cpc-promo-time {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.cpc-promo-info .cpc-store-name {
    font-size: 14px;
    color: #4a90e2;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    opacity: 1;
    padding-left: 0;
    margin-bottom: 4px;
}

.cpc-promo-info .cpc-store-name::before {
    display: none;
}

/* === PROMO BUTTON SECTION (RIGHT SIDE) === */
.cpc-promo-button-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cpc-promo-main-button {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: var(--cpc-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cpc-promo-main-button:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white;
}

/* Hidden code functionality for promo */
.cpc-promo-code-hidden {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--cpc-transition);
    min-width: 120px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cpc-promo-code-hidden:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.cpc-promo-code-revealed-button {
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    min-width: 120px;
    text-align: center;
    animation: revealCode 0.5s ease-out;
}

/* === RECOMMENDATION BADGE === */
.cpc-recommendation-badge {
    position: absolute;
    top: -1px;
    left: -1px;
    background: #10b981;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.cpc-recommendation-badge::before {
    content: '👍 ';
    margin-right: 4px;
}

/* === PROMO CARD WITH RECOMMENDATION === */
.cpc-coupon-promo.recommended {
    border: 2px solid #10b981;
    border-left: 4px solid #10b981;
}

.cpc-coupon-promo.recommended:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* === PROMO CODE SECTION === */
.cpc-promo-code-section {
    background: #f8fafc;
    border-radius: var(--cpc-border-radius-small);
    padding: 20px;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    transition: var(--cpc-transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Promo hidden state */
.cpc-promo-code-section .cpc-code-hidden {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 28px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
    transition: var(--cpc-transition);
    position: relative;
    overflow: hidden;
    width: 100%;
    cursor: pointer;
}

.cpc-promo-code-section .cpc-code-hidden:hover {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.6);
}

/* Promo revealed state */
.cpc-promo-code-section .cpc-code-revealed {
    background: white;
    border: 2px solid #48bb78;
    border-radius: 12px;
    padding: 16px 20px;
    animation: revealCode 0.5s ease-out;
}

.cpc-promo-code-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e0, transparent);
}

.cpc-promo-code-section:hover {
    border-color: #cbd5e0;
    background: #ffffff;
}

.cpc-code-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Promo revealed code value */
.cpc-promo-code-section .cpc-code-revealed .cpc-code-value {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #48bb78;
    text-align: center;
    margin: 8px 0;
    position: relative;
    user-select: all;
}

.cpc-promo-code-section .cpc-code-revealed .cpc-code-label {
    color: #48bb78;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 600;
}

.cpc-promo-code-section .cpc-code-success-message {
    background: #c6f6d5;
    color: #22543d;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    margin-top: 8px;
    display: none;
    font-weight: 600;
}

.cpc-promo-code-section .cpc-code-revealed .cpc-code-success-message {
    display: block;
    animation: fadeIn 0.3s ease-in 0.2s both;
}

.cpc-promo-code-section .cpc-copy-button {
    background: var(--cpc-primary-gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--cpc-transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.cpc-promo-code-section .cpc-copy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--cpc-transition-fast);
}

.cpc-promo-code-section .cpc-copy-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.cpc-promo-code-section .cpc-copy-button:hover::before {
    left: 100%;
}

.cpc-promo-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cpc-expiry-info {
    font-size: 13px;
    color: #718096;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.cpc-expiry-info::before {
    content: '📅';
    font-size: 14px;
}

.cpc-get-deal-button {
    background: var(--cpc-warning-gradient);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--cpc-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.3);
    position: relative;
    overflow: hidden;
}

.cpc-get-deal-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--cpc-transition-fast);
}

.cpc-get-deal-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.4);
    text-decoration: none;
    color: white;
}

.cpc-get-deal-button:hover::before {
    left: 100%;
}

.cpc-get-deal-button::after {
    content: '🚀';
    transition: var(--cpc-transition-fast);
}

.cpc-get-deal-button:hover::after {
    transform: scale(1.2);
}

/* === LAYOUT STYLES === */
.cpc-coupon-list {
    margin: 28px 0;
}

.cpc-layout-grid {
    display: grid;
    gap: 28px;
}

.cpc-columns-1 { grid-template-columns: 1fr; }
.cpc-columns-2 { grid-template-columns: repeat(2, 1fr); }
.cpc-columns-3 { grid-template-columns: repeat(3, 1fr); }
.cpc-columns-4 { grid-template-columns: repeat(4, 1fr); }

.cpc-layout-list .cpc-coupon {
    margin-bottom: 20px;
}

/* === BRAND CATEGORY STYLES === */
.cpc-brand-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: var(--cpc-light-gradient);
    border-radius: var(--cpc-border-radius);
    box-shadow: var(--cpc-shadow-soft);
}

.cpc-brand-title {
    font-size: 32px;
    font-weight: 900;
    color: #1a202c;
    margin: 0 0 8px 0;
    letter-spacing: -1px;
}

.cpc-brand-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0;
    font-weight: 500;
}

.cpc-brand-count {
    display: inline-block;
    background: var(--cpc-primary-gradient);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1024px) {
    .cpc-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .cpc-columns-2,
    .cpc-columns-3,
    .cpc-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cpc-coupon-inner {
        padding: 24px;
    }
    
    .cpc-promo-inner {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        min-height: auto;
    }
    
    .cpc-promo-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .cpc-promo-discount-section {
        border-right: none;
        border-bottom: 2px dashed #e5e7eb;
        margin-right: 0;
        margin-bottom: 16px;
        padding-bottom: 16px;
        min-width: auto;
    }
    
    .cpc-discount-main {
        font-size: 28px;
    }
    
    .cpc-promo-button-section {
        align-items: stretch;
    }
    
    .cpc-promo-main-button,
    .cpc-promo-code-hidden,
    .cpc-promo-code-revealed-button {
        width: 100%;
        min-width: auto;
    }
    
    .cpc-coupon-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .cpc-discount-badge {
        align-self: center;
        max-width: 200px;
    }
    
    .cpc-coupon-code-section,
    .cpc-code-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .cpc-coupon-title {
        font-size: 20px;
    }
    
    .cpc-promo-title {
        font-size: 18px;
    }
    
    .cpc-brand-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .cpc-columns-2,
    .cpc-columns-3,
    .cpc-columns-4 {
        grid-template-columns: 1fr;
    }
    
    .cpc-coupon-inner {
        padding: 16px;
    }
    
    .cpc-promo-inner {
        padding: 16px;
        gap: 16px;
    }
    
    .cpc-promo-discount-section {
        padding: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .cpc-discount-main {
        font-size: 24px;
    }
    
    .cpc-discount-text {
        font-size: 12px;
    }
    
    .cpc-promo-title {
        font-size: 16px;
    }
    
    .cpc-promo-description {
        font-size: 13px;
    }
    
    .cpc-store-logo {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .cpc-code-value {
        font-size: 14px;
        letter-spacing: 1px;
        padding: 10px 12px;
        word-break: break-all;
        min-width: 80px;
    }
    
    .cpc-copy-button {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .cpc-coupon-title {
        font-size: 18px;
    }
    
    .cpc-brand-header {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .cpc-brand-title {
        font-size: 18px;
    }
    
    /* Improve touch targets for mobile */
    .cpc-copy-button,
    .cpc-shop-button,
    .cpc-get-deal-button,
    .cpc-promo-main-button,
    .cpc-promo-code-hidden,
    .cpc-promo-code-revealed-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .cpc-coupon-list {
        margin: 16px 0;
    }
    
    .cpc-layout-grid {
        gap: 16px;
    }
    
    .cpc-recommendation-badge {
        font-size: 10px;
        padding: 6px 12px;
    }
}

/* === UTILITY CLASSES === */
.cpc-no-coupons {
    text-align: center;
    padding: 48px 24px;
    color: #4a5568;
    background: var(--cpc-light-gradient);
    border: 2px dashed #cbd5e0;
    border-radius: var(--cpc-border-radius);
    font-size: 16px;
    font-weight: 500;
}

.cpc-no-coupons::before {
    content: '🎫';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.cpc-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    font-size: 16px;
    color: #718096;
}

.cpc-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cpc-api-indicator {
    text-align: center;
    margin-bottom: 24px;
}

.cpc-api-badge {
    background: var(--cpc-success-gradient);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.cpc-api-badge::before {
    content: '●';
    color: #c6f6d5;
    font-size: 8px;
    animation: pulse 2s infinite;
}

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

.cpc-featured-badge {
    background: var(--cpc-secondary-gradient);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 16px;
    margin-left: 12px;
    box-shadow: 0 2px 8px rgba(240, 147, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.cpc-featured-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: featuredGlow 2s infinite;
}

@keyframes featuredGlow {
    0%, 90%, 100% { left: -100%; }
    45% { left: 100%; }
}

/* === ACCESSIBILITY === */
.cpc-copy-button:focus,
.cpc-shop-button:focus,
.cpc-get-deal-button:focus {
    outline: 3px solid #4299e1;
    outline-offset: 2px;
}

/* === FADE IN ANIMATIONS === */
.cpc-fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Stagger the animations for multiple coupons */
.cpc-coupon-item:nth-child(1) .cpc-fade-in { animation-delay: 0.1s; }
.cpc-coupon-item:nth-child(2) .cpc-fade-in { animation-delay: 0.2s; }
.cpc-coupon-item:nth-child(3) .cpc-fade-in { animation-delay: 0.3s; }
.cpc-coupon-item:nth-child(4) .cpc-fade-in { animation-delay: 0.4s; }
.cpc-coupon-item:nth-child(5) .cpc-fade-in { animation-delay: 0.5s; }
.cpc-coupon-item:nth-child(6) .cpc-fade-in { animation-delay: 0.6s; }

/* === PERFORMANCE OPTIMIZATIONS === */
.cpc-coupon {
    contain: layout style paint;
    will-change: auto;
}

.cpc-coupon:hover {
    will-change: transform, box-shadow;
}

.cpc-coupon-coupon::after {
    /* Optimize the rotating animation for better performance */
    transform-origin: center;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .cpc-coupon,
    .cpc-copy-button,
    .cpc-shop-button,
    .cpc-get-deal-button,
    .cpc-coupon-coupon::after,
    .cpc-discount-badge::before,
    .cpc-store-logo::before,
    .cpc-promo-discount::before,
    .cpc-code-value::before,
    .cpc-featured-badge::before,
    .cpc-fade-in {
        transition: none;
        animation: none;
    }
    
    .cpc-coupon:hover {
        transform: none;
    }
    
    .cpc-fade-in {
        opacity: 1;
        transform: none;
    }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
    :root {
        --cpc-light-gradient: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
    
    .cpc-coupon-promo {
        background: var(--cpc-dark-gradient);
        color: #e2e8f0;
    }
    
    .cpc-promo-title {
        color: #e2e8f0;
    }
    
    .cpc-promo-description {
        color: #a0aec0;
    }
    
    .cpc-promo-code-section {
        background: #1a202c;
        border-color: #4a5568;
    }
    
    .cpc-promo-code-section .cpc-code-value {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .cpc-brand-header {
        background: var(--cpc-dark-gradient);
        color: #e2e8f0;
    }
    
    .cpc-brand-title {
        color: #e2e8f0;
    }
    
    .cpc-no-coupons {
        background: var(--cpc-dark-gradient);
        color: #a0aec0;
        border-color: #4a5568;
    }
}