@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Roboto&family=Montserrat&family=Lato&family=Open+Sans&family=Poppins&family=Source+Sans+Pro&family=Ubuntu&family=Livvic:wght@400;500&family=Lobster&family=Dancing+Script:wght@400;500&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #1b1d1e;
    font-family: 'IBM Plex Sans', sans-serif;
    color: rgb(216, 213, 207);
}

.style-0 {
    padding: 32px;
    gap: 24px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    display: flex;
    box-sizing: border-box;
    min-height: 350px;
    padding-bottom: 60px;
    padding-right: 60px;
}

.style-1 {
    width: 500px;
    height: 250px;
    border-radius: 8px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    display: flex;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: visible !important;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    border: none;
    box-shadow: none;
    background: none;
    background-image: none;
    background-color: transparent;
}

.widget-logo {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.widget-logo:hover {
    transform: scale(1.1);
}

/* Embedded view specific styles */
@media (max-width: 500px) {
    .style-1 {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .time {
        font-size: calc(4em * (100vw / 500));
    }
    
    .date {
        font-size: calc(1.5em * (100vw / 500));
    }
}

/* Force dimensions when embedded */
.embedded .style-1 {
    width: 500px !important;
    height: 250px !important;
}

.embedded .time {
    font-size: 4em !important;
}

.embedded .date {
    font-size: 1.5em !important;
}

.clock {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.time {
    font-size: 4em;
    font-weight: 500;
    margin-bottom: 8px;
}

.date {
    font-size: 1.5em;
    opacity: 0.9;
    text-shadow: none;
}

.customization-panel {
    background-color: rgba(40, 42, 44, 0.8);
    border-radius: 5px;
    padding: 24px;
    width: 500px;
    margin: 0 auto;
}

.panel-section {
    margin-bottom: 24px;
}

.panel-section:last-child {
    margin-bottom: 0;
}

.panel-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: rgb(216, 213, 207);
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.control-group label {
    min-width: 120px;
    font-size: 14px;
}

.control-group input[type="color"] {
    width: 60px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.control-group input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgb(127, 118, 104);
    border-radius: 2px;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: rgb(250, 208, 41);
    border-radius: 50%;
    cursor: pointer;
}

.control-group select {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    background-color: rgb(27, 29, 30);
    color: rgb(216, 213, 207);
    border: 1px solid rgb(127, 118, 104);
    cursor: pointer;
}

.control-group span {
    margin-left: 8px;
    min-width: 40px;
    display: inline-block;
}

.embed-controls {
    margin-top: 16px;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.embed-preview {
    margin-top: 16px;
    padding: 16px;
    background-color: rgba(27, 29, 30, 0.8);
    border-radius: 4px;
    border: 1px solid rgb(127, 118, 104);
}

.embed-preview .code-container {
    margin-bottom: 12px;
}

.embed-preview input[type="text"] {
    width: 100%;
    padding: 12px;
    background-color: rgb(27, 29, 30);
    border: 1px solid rgb(127, 118, 104);
    border-radius: 4px;
    color: rgb(216, 213, 207);
    font-family: monospace;
    font-size: 14px;
}

.embed-preview .button-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.embed-button, .copy-button {
    background-color: #4A5568;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex: 1;
}

.embed-button:hover, .copy-button:hover {
    background-color: #2D3748;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.embed-button:active, .copy-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.copy-button {
    background-color: #3182CE;
}

.copy-button:hover {
    background-color: #2C5282;
}

.copy-feedback {
    color: #48BB78;
    font-size: 14px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.copy-feedback:not(.hidden) {
    opacity: 1;
}

.hidden {
    display: none !important;
}

#embed-link {
    width: 100%;
    padding: 12px;
    background-color: rgb(27, 29, 30);
    border: 1px solid rgb(127, 118, 104);
    border-radius: 4px;
    color: rgb(216, 213, 207);
    font-family: monospace;
    font-size: 14px;
    cursor: text;
    resize: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#embed-link:focus {
    outline: none;
    border-color: rgb(250, 208, 41);
}

.footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 20px 0;
}

.footer-image {
    width: 15%;
    height: auto;
}

.effects-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.effects-controls .control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.effects-controls input[type="range"] {
    flex: 1;
    height: 4px;
    background: #3a3f42;
    border-radius: 2px;
    appearance: none;
    outline: none;
}

.effects-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fad029;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.effects-controls input[type="range"]::-webkit-slider-thumb:hover {
    background: #ff6b6b;
}

.effects-controls select {
    flex: 1;
    padding: 4px 8px;
    background: #3a3f42;
    border: none;
    border-radius: 4px;
    color: rgb(216, 213, 207);
    cursor: pointer;
    outline: none;
}

/* Add specific style overrides for effects */
.style-1[style*="box-shadow"] {
    overflow: visible !important;
}

.style-1[style*="border"] {
    background-clip: padding-box;
}

/* Text Effects */
@keyframes rainbow {
    0% { color: #ff0000 !important; }
    16.6% { color: #ff8800 !important; }
    33.3% { color: #ffff00 !important; }
    50% { color: #00ff00 !important; }
    66.6% { color: #00ffff !important; }
    83.3% { color: #0000ff !important; }
    100% { color: #ff0000 !important; }
}

/* Sparkle Effect */
.clock[data-effect="sparkle"] {
    position: relative;
}

.clock[data-effect="sparkle"] .time,
.clock[data-effect="sparkle"] .date {
    position: relative;
    color: white !important;
}

/* Dynamic sparkle particles */
.sparkle-particle {
    position: absolute;
    pointer-events: none;
    animation: sparkle-pop 2000ms ease-in-out forwards;
    font-size: 15.75px;
    line-height: 1;
    color: white;
    z-index: 2;
    will-change: transform, opacity;
    text-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
}

.sparkle-particle::before {
    content: '★';
}

@keyframes sparkle-pop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    25% {
        transform: scale(0.6) rotate(90deg);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.95;
    }
    75% {
        transform: scale(0.6) rotate(270deg);
        opacity: 0.4;
    }
    100% {
        transform: scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Static sparkles */
.clock[data-effect="sparkle"] .time::before,
.clock[data-effect="sparkle"] .time::after,
.clock[data-effect="sparkle"] .date::before,
.clock[data-effect="sparkle"] .date::after {
    content: '★';
    position: absolute;
    font-size: 15.75px;
    line-height: 1;
    animation: sparkle-pop 2000ms ease-in-out infinite;
    pointer-events: none;
    opacity: 0;
    text-shadow: 0 0 4px currentColor, 0 0 8px currentColor;
    z-index: 2;
}

/* Neon glow effect - specifically for time only */
.clock[data-effect="neon"] .time {
    text-shadow: var(--neon-glow) !important;
}

.clock[data-effect="neon"] .date {
    text-shadow: none;
    color: white !important;
    opacity: 0.9;
}

/* Rainbow Text Effect with enhanced glow */
[data-effect="rainbow"] .time,
[data-effect="rainbow"] .date {
    background: linear-gradient(
        to right,
        #ff0000,
        #ff8000,
        #ffff00,
        #00ff00,
        #00ffff,
        #0000ff,
        #8000ff,
        #ff0080
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow-shift 5s linear infinite;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5))
           drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

@keyframes rainbow-shift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.background-type-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gradient-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#gradient-section {
    display: none;
}