/* Crypto Degen Gallery - Frontend Styles */
/* Style banquise glacé - MONI THE YETI */

.cdg-gallery-container {
    position: relative;
    width: 100%;
    padding: 2rem;
    z-index: 1;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cdg-section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.5);
    letter-spacing: 2px;
}

/* Top 10 Section */
.cdg-top10-section {
    margin-bottom: 4rem;
}

.cdg-top10-header {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    margin-top: 1rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

.cdg-back-to-gallery-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(59, 130, 246, 0.4) 100%);
    border: 2px solid rgba(59, 130, 246, 0.6);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    align-self: flex-start;
    z-index: 10;
    position: relative;
}

.cdg-back-to-gallery-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5) 0%, rgba(59, 130, 246, 0.6) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    text-decoration: none !important;
}

.cdg-back-to-gallery-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cdg-back-to-gallery-btn:hover svg {
    transform: translateX(-3px);
}

.cdg-top10-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Top Gallery Button Section */
.cdg-top-gallery-button-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 2rem 0 0.5rem 0;
}

.cdg-top-gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    background: #1e3a5f;
    border: 2px solid #3b82f6;
    border-radius: 16px;
    color: #ffffff;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    overflow: visible;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.4),
        0 0 40px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cdg-top-gallery-btn,
.cdg-top-gallery-btn *,
.cdg-top-gallery-btn:hover,
.cdg-top-gallery-btn:focus,
.cdg-top-gallery-btn:active,
.cdg-top-gallery-btn .cdg-btn-text,
.cdg-top-gallery-btn .cdg-btn-icon {
    text-decoration: none !important;
    text-underline: none !important;
    -webkit-text-decoration: none !important;
}

.cdg-top-gallery-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 16px;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.6), rgba(96, 165, 250, 0.6));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.cdg-top-gallery-btn:hover::before {
    opacity: 1;
}

.cdg-top-gallery-btn:focus {
    outline: none;
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.4),
        0 0 40px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cdg-top-gallery-btn:hover {
    background: #1e3a5f;
    border-color: #60a5fa;
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.6),
        0 0 60px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cdg-top-gallery-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 0 15px rgba(59, 130, 246, 0.4),
        0 0 30px rgba(59, 130, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cdg-top-gallery-btn .cdg-btn-icon {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cdg-top-gallery-btn .cdg-btn-text {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .cdg-top-gallery-button-section {
        padding: 1.5rem 1rem;
    }
    
    .cdg-top-gallery-btn {
        padding: 1.2rem 2rem;
        font-size: 1rem;
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }
    
    .cdg-top-gallery-btn .cdg-btn-icon {
        font-size: 1.5rem;
    }
    
    .cdg-top-gallery-btn .cdg-btn-text {
        font-size: 1rem;
    }
}

/* Gallery Description */
.cdg-gallery-description {
    text-align: center;
    margin: 1.5rem auto 2rem;
    max-width: 800px;
    padding: 1.5rem;
    background: rgba(10, 21, 32, 0.6);
    border: 2px solid rgba(135, 206, 250, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.cdg-gallery-description p {
    margin: 0 0 1rem 0;
}

.cdg-gallery-description p:last-child {
    margin-bottom: 0;
}

.cdg-gallery-description a {
    color: #87ceeb;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cdg-gallery-description a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(135, 206, 250, 0.6);
}

/* Votes Info */
.cdg-votes-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.cdg-votes-info p {
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
}

.cdg-votes-info strong {
    color: #60a5fa;
    font-size: 1.3rem;
}

/* Creations Grid */
.cdg-creations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.cdg-creations-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.cdg-creations-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Creation Card */
.cdg-creation-card {
    position: relative;
    background: rgba(10, 21, 32, 0.7);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.cdg-creation-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
}

/* Rank Badge */
.cdg-rank-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Media Wrapper */
.cdg-media-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.cdg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cdg-creation-card:hover .cdg-media {
    transform: scale(1.05);
}

/* Card Content */
.cdg-card-content {
    padding: 1.5rem;
}

.cdg-creation-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

/* Vote Section */
.cdg-vote-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cdg-vote-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cdg-vote-btn:hover:not(.disabled):not(:disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(96, 165, 250, 0.4) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.cdg-vote-btn:active:not(.disabled):not(:disabled) {
    transform: translateY(0);
}

.cdg-vote-btn.voted {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(74, 222, 128, 0.3) 100%);
    border-color: rgba(34, 197, 94, 0.6);
    cursor: default;
}

.cdg-vote-btn.disabled,
.cdg-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
}

.cdg-vote-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cdg-vote-btn:hover:not(.disabled):not(:disabled) .cdg-vote-icon {
    transform: scale(1.2);
}

.cdg-vote-count {
    font-size: 1.1rem;
    font-weight: 700;
}

.cdg-voted-label {
    font-size: 0.9rem;
    color: #60a5fa;
    font-weight: 500;
}

.cdg-no-creations {
    grid-column: 1 / -1;
    text-align: center;
    color: #ffffff;
    font-size: 1.2rem;
    padding: 3rem;
    background: rgba(10, 21, 32, 0.5);
    border-radius: 15px;
    border: 2px dashed rgba(59, 130, 246, 0.3);
}

/* Contest Countdown */
.cdg-contest-countdown {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(135deg, rgba(10, 21, 32, 0.95) 0%, rgba(15, 30, 45, 0.95) 100%);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(59, 130, 246, 0.1) inset,
                0 0 40px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.cdg-contest-countdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: cdgShimmer 3s infinite;
}

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

.cdg-contest-countdown h3 {
    color: #ffffff;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.6),
                 0 0 20px rgba(96, 165, 250, 0.4);
    position: relative;
    z-index: 1;
}

.cdg-countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: #60a5fa;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.6);
}

.cdg-countdown span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3ch;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(96, 165, 250, 0.15) 100%);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    text-align: center;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.8),
                 0 0 20px rgba(96, 165, 250, 0.4);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3),
                0 0 0 1px rgba(96, 165, 250, 0.2) inset;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cdg-countdown span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.cdg-countdown span:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5),
                0 0 0 1px rgba(96, 165, 250, 0.3) inset;
}

.cdg-countdown span:hover::before {
    left: 100%;
}

.cdg-countdown span:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.5rem;
    width: 2px;
    height: 60%;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
}

/* Clickable Media */
.cdg-clickable-media {
    cursor: pointer;
    transition: opacity 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.cdg-clickable-media:hover {
    opacity: 0.9;
}

.cdg-clickable-media * {
    pointer-events: none;
}

/* Creation Author */
.cdg-creation-author {
    font-size: 0.9rem;
    color: #87ceeb;
    margin: 0 0 1rem 0;
    text-align: center;
    line-height: 1.3;
}

/* Stats Section */
.cdg-stats-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.cdg-view-count {
    font-size: 0.9rem;
    color: #87ceeb;
}

/* Modal */
.cdg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 10000;
    overflow: hidden;
}

.cdg-modal.active {
    display: block !important;
    /* Ensure it stays fixed to viewport */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
}

/* Center content relative to viewport, not modal scroll */
.cdg-modal.active .cdg-modal-content {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.cdg-modal-overlay {
    display: none !important;
}

.cdg-modal-content {
    position: relative;
    z-index: 10001;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    background: rgba(10, 21, 32, 0.95);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: auto !important;
    align-self: center !important;
    flex-shrink: 0;
}

.cdg-modal-content {
    position: relative;
}

.cdg-modal-close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.9);
    border: 2px solid rgba(239, 68, 68, 1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 10003 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.cdg-modal-close:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
}

.cdg-modal-media-wrapper {
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}

.cdg-modal-image,
.cdg-modal-video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.cdg-modal-info {
    padding: 0.75rem 2rem 2rem 2rem;
    color: #ffffff;
}

.cdg-modal-info-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-bottom: 0.75rem;
    border-bottom: none;
}

.cdg-modal-info h3 {
    font-size: 1.8rem;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(59, 130, 246, 0.5);
    font-weight: 700;
    line-height: 1.1;
}

.cdg-modal-author {
    font-size: 1.1rem;
    color: #87ceeb;
    margin: 0;
    font-weight: 500;
    line-height: 1.2;
}

.cdg-modal-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 1.1rem;
}

.cdg-modal-votes,
.cdg-modal-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 600;
}

.cdg-modal-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 1rem;
    border-top: none;
}

.cdg-modal-actions .cdg-vote-btn {
    order: -1;
    margin-right: auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cdg-modal-actions .cdg-vote-btn {
        order: 0;
        margin-right: 0;
        width: 100%;
        justify-content: center;
    }
}

.cdg-share-twitter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.2) 0%, rgba(29, 161, 242, 0.3) 100%);
    border: 2px solid rgba(29, 161, 242, 0.5);
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    text-underline: none !important;
    outline: none !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.cdg-share-twitter-btn:focus,
.cdg-share-twitter-btn:active,
.cdg-share-twitter-btn:visited {
    text-decoration: none !important;
    outline: none !important;
}

.cdg-share-twitter-btn:hover {
    background: linear-gradient(135deg, rgba(29, 161, 242, 0.4) 0%, rgba(29, 161, 242, 0.5) 100%);
    border-color: rgba(29, 161, 242, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.5);
    color: #ffffff;
    text-decoration: none !important;
    outline: none !important;
}

.cdg-share-twitter-btn svg {
    width: 20px;
    height: 20px;
}

.cdg-share-telegram-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.2) 0%, rgba(37, 150, 190, 0.3) 100%);
    border: 2px solid rgba(37, 150, 190, 0.5);
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none !important;
    text-underline: none !important;
    outline: none !important;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(37, 150, 190, 0.3);
}

.cdg-share-telegram-btn:focus,
.cdg-share-telegram-btn:active,
.cdg-share-telegram-btn:visited {
    text-decoration: none !important;
    outline: none !important;
}

.cdg-share-telegram-btn:hover {
    background: linear-gradient(135deg, rgba(37, 150, 190, 0.4) 0%, rgba(37, 150, 190, 0.5) 100%);
    border-color: rgba(37, 150, 190, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 150, 190, 0.5);
    color: #ffffff;
    text-decoration: none !important;
    outline: none !important;
}

.cdg-share-telegram-btn svg {
    width: 20px;
    height: 20px;
}

.cdg-share-link-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.3) 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cdg-share-link-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(59, 130, 246, 0.5) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

.cdg-share-link-btn svg {
    width: 20px;
    height: 20px;
}

/* Pagination */
.cdg-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0 1rem;
    flex-wrap: wrap;
}

.cdg-pagination-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cdg-pagination-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(96, 165, 250, 0.4) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

.cdg-pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
}

.cdg-pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.cdg-pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cdg-pagination-number:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.cdg-pagination-number.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4) 0%, rgba(96, 165, 250, 0.4) 100%);
    border-color: rgba(59, 130, 246, 0.8);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.cdg-pagination-dots {
    color: #87ceeb;
    padding: 0 0.5rem;
}

.cdg-pagination-info {
    text-align: center;
    margin-top: 1rem;
    color: #ffffff;
    font-size: 0.9rem;
}

.cdg-pagination-info p {
    margin: 0;
}

.cdg-pagination-info strong {
    color: #60a5fa;
}

/* Responsive */
@media (max-width: 768px) {
    .cdg-gallery-container {
        padding: 1rem;
    }
    
    .cdg-top10-header {
        gap: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .cdg-back-to-gallery-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        align-self: center;
        width: auto;
    }
    
    .cdg-section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .cdg-top10-grid,
    .cdg-creations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cdg-creations-grid[data-columns="2"],
    .cdg-creations-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .cdg-creation-card {
        border-radius: 12px;
    }
    
    .cdg-card-content {
        padding: 1rem;
    }
    
    .cdg-vote-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .cdg-contest-countdown {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cdg-contest-countdown h3 {
        font-size: clamp(0.9rem, 3vw, 1.2rem);
        margin-bottom: 1.25rem;
        letter-spacing: 0.5px;
    }
    
    .cdg-countdown {
        font-size: clamp(1rem, 4vw, 1.5rem);
        gap: 0.5rem;
    }
    
    .cdg-countdown span {
        padding: 0.4rem 0.6rem;
        min-width: 2.5ch;
        font-size: clamp(0.9rem, 3.5vw, 1.4rem);
        border-radius: 10px;
    }
    
    .cdg-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .cdg-modal-info {
        padding: 0.625rem 1.5rem 1.5rem 1.5rem;
        gap: 0.875rem;
    }
    
    .cdg-modal-info-header {
        padding-bottom: 0.625rem;
        gap: 0.15rem;
    }
    
    .cdg-modal-info h3 {
        font-size: 1.4rem;
    }
    
    .cdg-modal-author {
        font-size: 1rem;
    }
    
    .cdg-modal-stats {
        flex-direction: row;
        gap: 1.5rem;
        padding: 0.875rem;
        font-size: 1rem;
    }
    
    .cdg-modal-actions {
        flex-direction: column;
        gap: 0.625rem;
        padding-top: 0.875rem;
    }
    
    .cdg-share-twitter-btn,
    .cdg-share-telegram-btn,
    .cdg-share-link-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cdg-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cdg-pagination-numbers {
        justify-content: center;
    }
    
    .cdg-pagination-btn {
        width: 100%;
        text-align: center;
    }
    
    .cdg-gallery-description {
        padding: 1rem;
        font-size: 1rem;
        margin: 1rem auto 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cdg-top10-grid,
    .cdg-creations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Animations */
@keyframes cdg-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cdg-creation-card {
    animation: cdg-fade-in 0.5s ease-out;
}

@keyframes cdg-vote-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cdg-vote-btn.voting .cdg-vote-icon {
    animation: cdg-vote-pulse 0.6s ease-in-out infinite;
}

/* Submit Section */
.cdg-submit-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0 0.25rem 0;
    gap: 1rem;
}

.cdg-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 3rem;
    background: #1e3a5f;
    border: 2px solid #22c55e;
    border-radius: 16px;
    color: #ffffff;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    overflow: visible;
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    box-shadow: 
        0 0 20px rgba(34, 197, 94, 0.4),
        0 0 40px rgba(34, 197, 94, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cdg-submit-btn:hover:not(:disabled) {
    background: #1e3a5f;
    border-color: #4ade80;
    box-shadow: 
        0 0 30px rgba(34, 197, 94, 0.6),
        0 0 60px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.cdg-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cdg-submit-info-text {
    color: #87ceeb;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}

/* Submit Modal */
.cdg-submit-modal-content {
    max-width: 650px;
    width: 100%;
    overflow: visible;
    animation: modalSlideIn 0.3s ease-out;
    margin: 0 auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cdg-submit-form-wrapper {
    padding: 2.5rem;
    position: relative;
    background: linear-gradient(135deg, rgba(10, 21, 32, 0.95) 0%, rgba(15, 30, 45, 0.95) 100%);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.cdg-submit-form-header-image {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.cdg-submit-form-header-image img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5)) drop-shadow(0 0 40px rgba(167, 139, 250, 0.3));
    object-fit: contain;
    animation: cdgPulseCalm 3s ease-in-out infinite;
}

@keyframes cdgPulseCalm {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5)) drop-shadow(0 0 40px rgba(167, 139, 250, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.7)) drop-shadow(0 0 50px rgba(167, 139, 250, 0.5));
    }
}

.cdg-submit-form-wrapper h2 {
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.cdg-submit-info {
    color: #a5b4fc;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.7;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.cdg-form-group {
    margin-bottom: 1.75rem;
    position: relative;
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.cdg-form-group:nth-child(1) { animation-delay: 0.1s; }
.cdg-form-group:nth-child(2) { animation-delay: 0.2s; }
.cdg-form-group:nth-child(3) { animation-delay: 0.3s; }

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

.cdg-form-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #e0e7ff;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.cdg-form-group label .required {
    color: #f87171;
    font-weight: 700;
    margin-left: 4px;
}

.cdg-form-group label .char-count {
    color: #a5b4fc;
    font-weight: 500;
    font-size: 0.85rem;
    background: rgba(59, 130, 246, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cdg-form-group input:focus + label .char-count,
.cdg-form-group:focus-within label .char-count {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

.cdg-form-group input[type="text"],
.cdg-form-group input[type="url"],
.cdg-form-group input[type="file"] {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    backdrop-filter: blur(10px);
}

.cdg-form-group input[type="text"]::placeholder {
    color: #64748b;
    opacity: 0.7;
}

.cdg-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.cdg-form-group input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.cdg-file-input-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.cdg-file-input-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.cdg-file-input-label:hover::before {
    left: 100%;
}

.cdg-file-input-label:hover {
    border-color: #60a5fa;
    border-style: solid;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.cdg-file-input-label.error {
    border-color: #f87171;
    border-style: solid;
    background: rgba(30, 15, 15, 0.6);
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.3);
}

.cdg-file-input-button {
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    margin-right: 1rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.cdg-file-input-button::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;
}

.cdg-file-input-label:hover .cdg-file-input-button {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.cdg-file-input-label:active .cdg-file-input-button::after {
    width: 300px;
    height: 300px;
}

.cdg-file-input-text {
    color: #a5b4fc;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.cdg-file-input-label:hover .cdg-file-input-text {
    color: #93c5fd;
}

.cdg-form-group input[type="text"]:focus,
.cdg-form-group input[type="url"]:focus {
    outline: none;
    border-color: #60a5fa;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 0 20px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.cdg-form-group input[type="text"].error,
.cdg-form-group input[type="url"].error {
    border-color: #f87171;
    background: rgba(30, 15, 15, 0.6);
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.3);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.cdg-file-input-label.error {
    border-color: #f87171;
    border-style: solid;
    background: rgba(30, 15, 15, 0.6);
    box-shadow: 
        0 0 0 3px rgba(239, 68, 68, 0.1),
        0 0 20px rgba(239, 68, 68, 0.3);
    animation: shake 0.4s ease-in-out;
}

.cdg-form-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.625rem;
    padding-left: 0.25rem;
}

.cdg-form-help::before {
    content: 'ℹ';
    color: #60a5fa;
    font-weight: bold;
    font-size: 0.9rem;
}

.cdg-media-preview {
    margin-top: 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.5);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    position: relative;
    animation: previewFadeIn 0.4s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes previewFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cdg-media-preview img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}

.cdg-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.cdg-submit-form-btn,
.cdg-cancel-btn {
    padding: 0.875rem 2.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    letter-spacing: 0.3px;
}

.cdg-submit-form-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.cdg-submit-form-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;
}

.cdg-submit-form-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.cdg-submit-form-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-color: #4ade80;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.cdg-submit-form-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cdg-submit-form-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cdg-submit-form-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.cdg-submit-form-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.cdg-cancel-btn {
    background: rgba(15, 23, 42, 0.6);
    border-color: #64748b;
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.cdg-cancel-btn:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: #94a3b8;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

.cdg-form-message {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    animation: messageSlideIn 0.3s ease-out;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cdg-form-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 2px solid #22c55e;
    color: #4ade80;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.cdg-form-message.success::before {
    content: '✓';
    font-size: 1.2rem;
    font-weight: bold;
    color: #22c55e;
}

.cdg-form-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 2px solid #ef4444;
    color: #f87171;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.cdg-form-message.error::before {
    content: '⚠';
    font-size: 1.2rem;
    font-weight: bold;
    color: #ef4444;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cdg-modal.active {
        padding: 1rem 0.5rem;
    }
    
    .cdg-submit-modal-content {
        width: 95%;
        max-width: 95%;
        max-height: calc(100vh - 2rem);
        border-radius: 16px;
    }
    
    .cdg-submit-form-wrapper {
        padding: 2rem 1.25rem 1.75rem 1.25rem;
    }
    
    .cdg-submit-form-wrapper h2 {
        margin-top: 0;
        padding-top: 0;
    }
    
    .cdg-submit-form-header-image {
        display: none;
    }
    
    .cdg-submit-form-wrapper h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .cdg-submit-info {
        font-size: 0.875rem;
        padding: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .cdg-form-group {
        margin-bottom: 1.5rem;
    }
    
    .cdg-form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.625rem;
    }
    
    .cdg-form-group label .char-count {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .cdg-form-group input[type="text"],
    .cdg-form-group input[type="url"] {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .cdg-file-input-label {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .cdg-file-input-button {
        padding: 0.45rem 1rem;
        font-size: 0.9rem;
        margin-right: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .cdg-file-input-text {
        font-size: 0.85rem;
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .cdg-form-help {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .cdg-media-preview {
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .cdg-media-preview img {
        max-height: 300px;
    }
    
    .cdg-form-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 2rem;
    }
    
    .cdg-submit-form-btn,
    .cdg-cancel-btn {
        width: 100%;
        padding: 0.875rem 1.75rem;
        font-size: 0.95rem;
        min-width: auto;
    }
    
    .cdg-form-message {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
        margin-top: 1.25rem;
    }
}

@media (max-width: 480px) {
    .cdg-contest-countdown {
        padding: 0.875rem 0.75rem 1rem 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .cdg-contest-countdown h3 {
        font-size: clamp(0.85rem, 3.5vw, 1.1rem);
        margin-top: 0;
        margin-bottom: 0.625rem;
        letter-spacing: 0.3px;
    }
    
    .cdg-countdown {
        font-size: clamp(0.9rem, 4.5vw, 1.3rem);
        gap: 0.4rem;
    }
    
    .cdg-countdown span {
        padding: 0.35rem 0.5rem;
        min-width: 2ch;
        font-size: clamp(0.85rem, 4vw, 1.2rem);
        border-radius: 8px;
    }
    
    .cdg-modal.active {
        padding: 0 !important;
        align-items: flex-start !important;
    }
    
    .cdg-modal.active .cdg-modal-content {
        max-height: 100vh;
        overflow-y: auto;
        margin: 0;
        padding-top: 0;
    }
    
    .cdg-submit-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0;
        position: relative !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .cdg-submit-form-wrapper {
        padding: 3.5rem 1rem 1.5rem 1rem;
        min-height: 100vh;
    }
    
    .cdg-submit-form-wrapper h2 {
        margin-top: 0;
        padding-top: 0;
    }
    
    .cdg-submit-form-header-image {
        display: none;
    }
    
    .cdg-submit-modal-content .cdg-modal-close {
        position: fixed !important;
        top: calc(15px + env(safe-area-inset-top, 0)) !important;
        right: 15px !important;
        width: 36px;
        height: 36px;
        font-size: 20px;
        z-index: 10004 !important;
        background: rgba(239, 68, 68, 0.95) !important;
        border: 2px solid rgba(239, 68, 68, 1) !important;
    }
    
    .cdg-submit-form-wrapper h2 {
        font-size: 1.35rem;
    }
    
    .cdg-submit-info {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
    
    .cdg-form-group {
        margin-bottom: 1.25rem;
    }
    
    .cdg-form-group label {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
    
    .cdg-form-group label .char-count {
        margin-top: 0.25rem;
        width: 100%;
        text-align: left;
    }
}

/* Lightbox Modal for Full Size Images */
.cdg-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 20000;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.cdg-lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    /* Ensure it stays fixed to viewport */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Force centering */
    margin: 0;
    /* Ensure content starts at center */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cdg-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 20001;
}

.cdg-lightbox-content {
    position: relative;
    z-index: 20002;
    max-width: 90vw;
    max-height: 90vh;
    background: rgba(10, 21, 32, 0.98);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: lightboxSlideIn 0.3s ease-out;
    /* Ensure content is centered */
    margin: auto;
    align-self: center;
}

@keyframes lightboxSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cdg-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background: rgba(239, 68, 68, 0.9);
    border: 2px solid rgba(239, 68, 68, 1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 20003;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cdg-lightbox-close:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

.cdg-lightbox-media-wrapper {
    width: 100%;
    max-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
}

.cdg-lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.cdg-lightbox-video {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    display: block;
}

.cdg-lightbox-info {
    padding: 1.5rem 2rem;
    background: rgba(10, 21, 32, 0.95);
    border-top: 2px solid rgba(59, 130, 246, 0.3);
}

.cdg-lightbox-info h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cdg-lightbox-info p {
    color: #a5b4fc;
    font-size: 1rem;
    margin: 0 0 1rem 0;
}

.cdg-lightbox-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.cdg-lightbox-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.cdg-lightbox-votes,
.cdg-lightbox-views {
    color: #e0e7ff;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cdg-clickable-media {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.cdg-clickable-media:hover {
    transform: scale(1.02);
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .cdg-lightbox-modal.active {
        padding: 1rem 0.5rem;
    }
    
    .cdg-lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .cdg-lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
    
    .cdg-lightbox-media-wrapper {
        max-height: 60vh;
    }
    
    .cdg-lightbox-image,
    .cdg-lightbox-video {
        max-height: 60vh;
    }
    
    .cdg-lightbox-info {
        padding: 1.25rem 1.5rem;
    }
    
    .cdg-lightbox-info h3 {
        font-size: 1.25rem;
    }
    
    .cdg-lightbox-info p {
        font-size: 0.9rem;
    }
    
    .cdg-lightbox-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .cdg-lightbox-votes,
    .cdg-lightbox-views {
        font-size: 0.9rem;
    }
    
    .cdg-lightbox-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cdg-lightbox-actions .cdg-share-twitter-btn,
    .cdg-lightbox-actions .cdg-share-telegram-btn {
        width: 100%;
        justify-content: center;
    }
}

