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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    padding: 2rem 0;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

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

/* Tweets Section */
.tweets-section {
    width: calc(100vw - 20px);
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: calc(-50vw + 10px);
    margin-right: calc(-50vw + 10px);
    margin-top: 4rem;
    margin-bottom: 2rem;
    overflow: hidden;
    animation: fadeIn 2s ease-out 1.5s both;
}

.tweets-carousel {
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
}

.tweets-track {
    display: flex;
    gap: 2rem;
    animation: scrollHorizontal 100s linear infinite;
    width: max-content;
}

.tweets-track:hover {
    animation-play-state: paused;
}

@keyframes scrollHorizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.tweet-item {
    flex-shrink: 0;
    width: 350px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0.8;
}

.tweet-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.tweet-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.container {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

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

.title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.2;
    animation: fadeIn 1.2s ease-out 0.3s both;
}

.duration-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: fadeIn 1.4s ease-out 0.5s both;
}

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

.timer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    animation: fadeIn 1.5s ease-out 0.6s both;
}

.timer-block {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
    min-width: clamp(100px, 15vw, 150px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timer-block:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.timer-value {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: clamp(0.875rem, 2vw, 1rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.timer-separator {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.3);
    align-self: center;
    margin-top: -2rem;
}

/* Board Section */
.board-section {
    margin-top: 4rem;
    animation: fadeIn 1.8s ease-out 0.9s both;
}

.board-header {
    margin-bottom: 2rem;
}

.board-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.participants-count {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.6);
}

.participants-count span {
    font-weight: 700;
    color: #ffffff;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.action-btn::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;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.03);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.refresh-btn.loading .material-icons {
    animation: spin 1s linear infinite;
}

.save-btn.saving .material-icons {
    animation: pulse 0.5s ease-in-out;
}

.material-icons {
    font-size: 18px;
    vertical-align: middle;
}

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

.board {
    background: url('images/bg.png') center center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 16px;
    min-height: 500px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: default;
}

.tiger {
    position: absolute;
    width: 80px;
    height: 80px;
    cursor: grab;
    transition: transform 0.2s ease, opacity 0.3s ease, width 0.2s ease, height 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    animation: tigerAppear 0.4s ease-out;
}

@keyframes tigerAppear {
    from {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.tiger:hover {
    transform: scale(1.1);
    z-index: 100;
}

.tiger.dragging {
    cursor: grabbing;
    opacity: 0.8;
    z-index: 1000;
}

.tiger img {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.add-tiger-container {
    margin-top: 2rem;
    text-align: center;
}

.add-tiger-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.add-tiger-btn::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.6s ease;
}

.add-tiger-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.add-tiger-btn:hover::before {
    left: 100%;
}

.add-tiger-btn:active {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.06);
}

.btn-icon {
    font-size: 1.5rem;
}

/* Tiger Selection Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

.modal-content h3 {
    font-size: 1.75rem;
    color: #ffffff;
    margin-bottom: 2rem;
    font-weight: 600;
}

.tiger-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tiger-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-width: 150px;
}

.tiger-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #6366f1;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.tiger-option img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.tiger-option span {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.125rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .timer-separator {
        display: none;
    }
    
    .timer-container {
        gap: 1rem;
    }
    
    .logo {
        max-width: 200px;
    }
    
    .board {
        min-height: 400px;
    }
    
    .tiger {
        width: 65px;
        height: 65px;
    }
    
    .add-tiger-btn {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .tweet-item {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .board {
        min-height: 300px;
    }
    
    .tiger {
        width: 55px;
        height: 55px;
    }
    
    .tweet-item {
        width: 240px;
    }
}

/* Size control buttons */
.tiger-controls {
    position: absolute;
    top: -8px;
    right: -8px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 10;
}

.tiger:hover .tiger-controls {
    display: flex;
}

.size-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #6366f1;
    background: white;
    color: #6366f1;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.size-btn:hover {
    background: #6366f1;
    color: white;
    transform: scale(1.1);
}

.size-btn:active {
    transform: scale(0.95);
}

/* Timer value update animation */
.timer-value.update {
    animation: pulse-number 0.3s ease;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 4rem;
}

.footer-disclaimer {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-devs {
    font-size: 0.875rem;
}

.footer-devs a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-devs a:hover {
    color: #8b5cf6;
    text-decoration: underline;
}

/* Confetti Canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

