/**
 * Riff Mountain Timer - Styles
 */

/* Container */
.riff-timer-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    background-color: #000000;
    color: #ffffff;
}

/* Background Effects */
.riff-timer-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.riff-timer-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #000000, #0a0a0a, #110505);
    opacity: 0.9;
}

.riff-timer-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background-image:
        linear-gradient(to right, rgba(128, 128, 128, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, transparent, 10%, black);
    -webkit-mask-image: linear-gradient(to bottom, transparent, 10%, black);
    transform: perspective(500px) rotateX(60deg) translateY(100px) scale(2);
    transform-origin: center bottom;
}

.riff-timer-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.riff-timer-glow-1 {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 24rem;
    /* Tailwind w-96 */
    height: 24rem;
    /* Tailwind h-96 */
    background-color: rgba(250, 72, 27, 0.1);
    /* bg-[#fa481b]/10 */
    border-radius: 9999px;
    /* rounded-full */
    filter: blur(100px);
    /* blur-[100px] */
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    /* animate-pulse */
}

.riff-timer-glow-2 {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background-color: rgba(250, 72, 27, 0.2);
    /* bg-[#fa481b]/20 */
    border-radius: 9999px;
    /* rounded-full */
    filter: blur(120px);
    /* blur-[120px] */
}

.riff-timer-fog {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 33.333%;
    background: linear-gradient(to top, #000000, #000000, transparent);
}

/* Content */
.riff-timer-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1280px;
    padding: 24px;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    animation-delay: 0.3s;
}

/* Logo */
.riff-timer-logo {
    margin-bottom: 64px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.riff-timer-logo img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

/* Timer Display */
.riff-timer-display {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 150px;
    justify-content: center;
}

/* Loading State */
.riff-timer-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.riff-timer-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(250, 72, 27, 0.2);
    border-top-color: var(--primary-color, #fa481b);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.riff-timer-loading-text {
    color: var(--primary-color, #fa481b);
    letter-spacing: 0.3em;
    font-size: 20px;
    font-weight: 700;
    animation: pulse 2s ease-in-out infinite;
}

/* Timer Wrapper */
.riff-timer-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.riff-timer-segments {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Time Segment */
.riff-timer-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 8px 24px;
    position: relative;
}

.riff-timer-box {
    position: relative;
    backdrop-filter: blur(24px);
    transform: skewX(-6deg);
    padding: 16px 24px;
    width: 144px;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(250, 72, 27, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: rgba(10, 10, 10, 0.8);
}

.riff-timer-box:hover {
    box-shadow: 0 0 40px rgba(250, 72, 27, 0.3);
}

.riff-timer-box-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(83, 3, 255, 0.1), transparent);
    opacity: 0.5;
}

.riff-timer-accent {
    position: absolute;
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-style: solid;
    border-color: #5303ff;
}

.riff-timer-accent-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.riff-timer-accent-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.riff-timer-value {
    position: relative;
    z-index: 10;
    font-size: 72px;
    font-weight: 700;
    transform: skewX(6deg);
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 1));
    font-variant-numeric: tabular-nums;
}

.riff-timer-scanline {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 2px, 3px 100%;
}

.riff-timer-label-box {
    margin-top: 16px;
    transform: skewX(-6deg);
    padding: 4px 12px;
    border-left: 2px solid #fa481b;
    background-color: rgba(250, 72, 27, 0.2);
}

.riff-timer-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    transform: skewX(6deg);
}

/* Separator */
.riff-timer-separator {
    padding-bottom: 48px;
    margin: 0 4px;
    font-size: 36px;
    font-weight: 700;
    color: rgba(250, 72, 27, 0.5);
    animation: pulse 2s ease-in-out infinite;
    transform: skewX(-6deg);
}

/* Button */
.riff-timer-button-wrapper {
    animation: zoomIn 0.5s ease-out;
    width: 100%;
    display: flex;
    justify-content: center;
}

.riff-timer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 4px;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    box-shadow: 0 0 15px rgba(250, 72, 27, 0.5);
}

.riff-timer-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(250, 72, 27, 0.8) !important;
    filter: brightness(1.1);
}

.riff-timer-button-text {
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .riff-timer-logo {
        margin-bottom: 40px;
    }

    .riff-timer-logo img {
        max-height: 180px;
    }

    .riff-timer-segment {
        margin: 0 4px 24px;
    }

    .riff-timer-box {
        padding: 16px;
        width: 96px;
        height: 112px;
    }

    .riff-timer-value {
        font-size: 48px;
    }

    .riff-timer-label {
        font-size: 12px;
    }

    .riff-timer-separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .riff-timer-logo img {
        max-height: 150px;
    }

    .riff-timer-box {
        width: 80px;
        height: 100px;
    }

    .riff-timer-value {
        font-size: 40px;
    }
}

/* Elementor Editor Support */
.elementor-element .riff-timer-container {
    min-height: 600px;
}