* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(ellipse at center, #2c1810 0%, #0a0605 100%);
    min-height: 100vh;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
    pointer-events: none;
    opacity: 0.3;
}

.container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    z-index: 1;
    margin: auto;
}

/* Dynamic scaling for small viewports */
@media (max-height: 800px) and (max-width: 768px) {
    .container {
        transform: scale(0.9);
        transform-origin: center center;
    }

    body {
        padding: 15px;
    }
}

@media (max-height: 700px) {
    .container {
        transform: scale(0.8);
        transform-origin: center center;
    }

    body {
        padding: 10px;
    }
}

@media (max-height: 600px) {
    .container {
        transform: scale(0.7);
    }

    body {
        padding: 5px;
    }
}

@media (max-height: 500px) {
    .container {
        transform: scale(0.6);
    }

    body {
        padding: 5px;
    }
}

@media (max-height: 400px) {
    .container {
        transform: scale(0.5);
    }
}

/* Scale down on very small screens (width) */
@media (max-width: 350px) {
    .container {
        transform: scale(0.85);
    }
}

@media (max-width: 300px) {
    .container {
        transform: scale(0.75);
    }
}

/* Combined small width and height (landscape phones) */
@media (max-width: 768px) and (max-height: 450px) {
    .container {
        transform: scale(0.6);
    }

    body {
        padding: 5px;
        align-items: flex-start;
        padding-top: 10px;
    }
}

@media (max-width: 600px) and (max-height: 400px) {
    .container {
        transform: scale(0.5);
    }
}

/* Touch-friendly styles */
@media (hover: none) and (pointer: coarse) {
    .handle {
        /* Larger touch target on mobile */
        min-width: 44px;
        min-height: 44px;
    }

    .handle-knob {
        /* Prevent touch delay */
        touch-action: manipulation;
    }

    .spin-button,
    .sound-toggle {
        /* Prevent touch delay */
        touch-action: manipulation;
        min-height: 44px;
    }
}

h1 {
    color: #ffd700;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow:
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 900;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
}

/* Tutorial Hint */
.tutorial-hint {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    animation: slideDown 0.5s ease-out;
    position: relative;
}

.tutorial-hint.hidden {
    animation: slideUp 0.3s ease-out forwards;
}

.hint-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.hint-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.hint-content p {
    margin: 0;
    flex: 1;
    font-size: 1rem;
    font-weight: 500;
}

.hint-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.hint-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

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

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 100px;
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}

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

/* Slot Machine */
.slot-machine {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 2rem;
}

.machine-body {
    background:
        linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%),
        linear-gradient(180deg, #d4291a 0%, #a81f13 50%, #8b1a0f 100%);
    border-radius: 30px 30px 40px 40px;
    padding: 50px 45px 45px 45px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.7),
        0 15px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 0 -8px 20px rgba(0, 0, 0, 0.4),
        inset 0 8px 20px rgba(255, 100, 80, 0.2);
    position: relative;
    min-width: 350px;
    border: 3px solid #4a0d08;
}

.machine-body::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 60%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    border-radius: 20px 20px 50% 50%;
    pointer-events: none;
}

.machine-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 8px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, transparent 70%);
    filter: blur(8px);
}

/* Machine Top Decoration */
.machine-top {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    border-radius: 15px 15px 0 0;
}

.top-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ff6b6b, #c92a2a);
    box-shadow:
        0 0 10px rgba(255, 107, 107, 0.6),
        inset -1px -1px 3px rgba(0, 0, 0, 0.5),
        inset 1px 1px 2px rgba(255, 255, 255, 0.3);
    animation: blink 2s ease-in-out infinite;
}

.top-light:nth-child(2) {
    animation-delay: 0.7s;
}

.top-light:nth-child(3) {
    animation-delay: 1.4s;
}

@keyframes blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(255, 107, 107, 0.6); }
    50% { opacity: 0.3; box-shadow: 0 0 5px rgba(255, 107, 107, 0.2); }
}

/* Title Plate */
.title-plate {
    background: linear-gradient(180deg, #c9b037 0%, #a0892e 50%, #8a7528 100%);
    border: 2px solid #6b5a1f;
    border-radius: 8px;
    padding: 8px 20px;
    margin-bottom: 20px;
    box-shadow:
        0 3px 6px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 3px rgba(0, 0, 0, 0.4);
    position: relative;
}

.machine-title {
    font-family: 'Impact', 'Arial Black', sans-serif;
    font-size: 1.3rem;
    color: #2c1810;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 -1px 0 rgba(0, 0, 0, 0.3);
    letter-spacing: 4px;
    font-weight: 900;
}

/* Reel Window */
.reel-window {
    background: #0a0a0a;
    border-radius: 12px;
    padding: 25px;
    box-shadow:
        inset 0 8px 20px rgba(0, 0, 0, 0.9),
        inset 0 0 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.2);
    border: 6px solid;
    border-color: #3a3a3a #1a1a1a #0a0a0a #2a2a2a;
    overflow: hidden;
    position: relative;
}

.window-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    pointer-events: none;
    box-shadow:
        inset 0 0 20px rgba(255, 215, 0, 0.1),
        0 0 20px rgba(255, 215, 0, 0.2);
}


.reel {
    background: #000;
    border-radius: 10px;
    padding: 30px 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow:
        0 0 10px #ffd700,
        0 0 20px #ffd700,
        0 0 30px #ffd700;
    font-family: 'Courier New', monospace;
    transition: font-size 0.3s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scale down numbers based on digit count */
.number.medium {
    font-size: 3rem;
}

.number.small {
    font-size: 2.2rem;
}

.number.tiny {
    font-size: 1.8rem;
}

/* Spinning Animation */
.reel.spinning .number {
    animation: spin 0.1s linear infinite;
    color: #ff6b6b;
    filter: blur(2px);
}

@keyframes spin {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.1); }
    100% { transform: translateY(0) scale(1); }
}

/* Stopped Animation */
.reel.stopped .number {
    animation: stopPulse 0.5s ease-out;
}

@keyframes stopPulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

/* Result Message */
.result-message {
    margin-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
    min-height: 35px;
}

.result-message.show {
    opacity: 1;
    transform: translateY(0);
    animation: resultPulse 0.5s ease;
}

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

/* Spin Counter */
.spin-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #ffd700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.3);
    margin-top: 10px;
}

.counter-label {
    font-weight: 600;
    opacity: 0.8;
}

.counter-value {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #fff;
    min-width: 20px;
    text-align: center;
}

/* Bottom Panel */
.bottom-panel {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding: 15px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    border-radius: 0 0 15px 15px;
}

.panel-light {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #4ecdc4, #2d8b85);
    box-shadow:
        0 0 8px rgba(78, 205, 196, 0.4),
        inset -1px -1px 2px rgba(0, 0, 0, 0.5),
        inset 1px 1px 1px rgba(255, 255, 255, 0.3);
    animation: panelBlink 3s ease-in-out infinite;
}

.panel-light:nth-child(2) { animation-delay: 0.6s; }
.panel-light:nth-child(3) { animation-delay: 1.2s; }
.panel-light:nth-child(4) { animation-delay: 1.8s; }
.panel-light:nth-child(5) { animation-delay: 2.4s; }

@keyframes panelBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; box-shadow: 0 0 12px rgba(78, 205, 196, 0.8); }
}

/* Handle */
.handle-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.handle {
    width: 25px;
    height: 140px;
    background:
        linear-gradient(90deg,
            #1a1a1a 0%,
            #3a3a3a 25%,
            #4a4a4a 50%,
            #3a3a3a 75%,
            #1a1a1a 100%
        );
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.6),
        inset 3px 0 6px rgba(255, 255, 255, 0.2),
        inset -3px 0 6px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    border: 2px solid #0a0a0a;
    margin-top: -5px;
    touch-action: none;
}

.handle::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 3px;
    width: 3px;
    height: 70%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
    border-radius: 2px;
}

@media (hover: hover) {
    .handle:hover {
        transform: scale(1.05);
        box-shadow:
            0 10px 25px rgba(0, 0, 0, 0.7),
            inset 3px 0 6px rgba(255, 255, 255, 0.3),
            inset -3px 0 6px rgba(0, 0, 0, 0.5);
    }
}

.handle:active {
    transform: translateY(20px);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.handle.touching {
    transform: scale(1.05);
}

.handle.pulled {
    animation: handlePull 0.3s ease;
}

@keyframes handlePull {
    0% { transform: translateY(0); }
    50% { transform: translateY(40px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); }
    100% { transform: translateY(0); }
}

.handle-knob {
    width: 50px;
    height: 50px;
    background:
        radial-gradient(circle at 30% 30%, #ff5e5e, #e74c3c 40%, #c0392b 70%, #8b1a0f);
    border-radius: 50%;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow:
        0 8px 15px rgba(0, 0, 0, 0.5),
        inset -3px -3px 8px rgba(0, 0, 0, 0.5),
        inset 3px 3px 8px rgba(255, 120, 100, 0.4);
    border: 3px solid #6b1409;
}

.handle-knob::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    width: 15px;
    height: 15px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 50%;
    filter: blur(2px);
}

/* Handle pulse effect for first-time users */
.handle-pulse {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    animation: pulsate 2s ease-out infinite;
    pointer-events: none;
    opacity: 0;
}

.handle-pulse.active {
    opacity: 1;
}

@keyframes pulsate {
    0% {
        transform: translateX(-50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) scale(1.8);
        opacity: 0;
    }
}

/* Controls */
.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.spin-button,
.sound-toggle {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.spin-button {
    background: linear-gradient(145deg, #27ae60, #229954);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (hover: hover) {
    .spin-button:hover:not(:disabled) {
        background: linear-gradient(145deg, #229954, #27ae60);
        transform: translateY(-2px);
        box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
    }
}

.spin-button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.spin-button:disabled {
    background: linear-gradient(145deg, #7d9d7f, #648569);
    cursor: not-allowed;
    opacity: 0.5;
    color: rgba(255, 255, 255, 0.5);
}

.sound-toggle {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: white;
}

@media (hover: hover) {
    .sound-toggle:hover {
        background: linear-gradient(145deg, #2980b9, #3498db);
        transform: translateY(-2px);
        box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
    }
}

.sound-toggle:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Info */
.info {
    background: linear-gradient(135deg, rgba(20, 15, 10, 0.8), rgba(40, 30, 20, 0.9));
    border-radius: 10px;
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.info-details {
    padding: 0;
}

.info-details summary {
    padding: 15px 20px;
    cursor: pointer;
    list-style: none;
    color: #ffd700;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    transition: all 0.2s;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-details summary:hover {
    background: rgba(255, 215, 0, 0.1);
}

.info-details summary::-webkit-details-marker {
    display: none;
}

.info-details summary::after {
    content: '▼';
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.info-details[open] summary::after {
    transform: rotate(180deg);
}

.info-content {
    padding: 0 20px 20px;
    animation: fadeIn 0.3s ease-out;
}

.info-content p {
    margin: 10px 0;
    color: rgba(255, 215, 0, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

.fibonacci-info {
    font-size: 0.85rem;
    color: #c9b037;
    font-style: italic;
    font-family: 'Courier New', monospace;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        letter-spacing: 2px;
    }

    .slot-machine {
        flex-direction: column;
        gap: 15px;
    }

    .machine-body {
        padding: 35px 30px;
        min-width: auto;
        max-width: 100%;
    }

    .machine-top {
        padding: 10px;
        margin-bottom: 15px;
    }

    .top-light {
        width: 10px;
        height: 10px;
    }

    .title-plate {
        padding: 6px 15px;
        margin-bottom: 15px;
    }

    .machine-title {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }

    .reel-window {
        padding: 20px;
    }

    .number {
        font-size: 3rem;
    }

    .result-message {
        font-size: 1.1rem;
        margin-top: 12px;
        min-height: 30px;
    }

    .spin-counter {
        font-size: 0.85rem;
        padding: 6px 14px;
        margin-top: 8px;
    }

    .counter-value {
        font-size: 1rem;
    }

    .bottom-panel {
        margin-top: 20px;
        padding: 12px;
    }

    .panel-light {
        width: 7px;
        height: 7px;
    }

    .handle-container {
        flex-direction: row;
        margin-top: 0;
        gap: 0;
    }

    .handle {
        transform: rotate(90deg);
        margin: 0;
        height: 120px;
        width: 22px;
    }

    .handle-knob {
        width: 45px;
        height: 45px;
    }

    .handle.pulled {
        animation: handlePullHorizontal 0.3s ease;
    }

    @keyframes handlePullHorizontal {
        0% { transform: rotate(90deg) translateY(0); }
        50% { transform: rotate(90deg) translateY(40px); }
        100% { transform: rotate(90deg) translateY(0); }
    }

    .controls {
        gap: 10px;
        margin-bottom: 1.5rem;
    }

    .spin-button,
    .sound-toggle {
        font-size: 1rem;
        padding: 12px 24px;
    }

    .info {
        padding: 15px;
    }

    .info p {
        font-size: 0.9rem;
        margin: 8px 0;
    }

    .fibonacci-info {
        font-size: 0.8rem;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    h1 {
        font-size: 1.6rem;
    }

    .machine-body {
        padding: 30px 20px;
    }

    .number {
        font-size: 2.5rem;
    }

    .result-message {
        font-size: 0.95rem;
        margin-top: 10px;
        min-height: 25px;
    }

    .spin-counter {
        font-size: 0.8rem;
        padding: 5px 12px;
        margin-top: 6px;
    }

    .machine-title {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .spin-button,
    .sound-toggle {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

/* Add shine effect to reel window */
.reel-window::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left 0.5s;
    pointer-events: none;
    z-index: 10;
}

.reel.stopped {
    animation: reelShine 0.5s ease;
}

@keyframes reelShine {
    0% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
    50% { box-shadow: 0 0 30px rgba(255, 215, 0, 0.6); }
    100% { box-shadow: 0 0 0 rgba(255, 215, 0, 0); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 350px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease-out;
}

.toast.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.toast.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.toast.info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-out forwards;
}

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

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .toast-container {
        right: 15px;
        left: 15px;
        bottom: 15px;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Fireworks */
.fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: fireworkLaunch 0.8s ease-out forwards;
}

.firework::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

@keyframes fireworkLaunch {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(var(--launch-height, -300px)) scale(0.5);
        opacity: 0;
    }
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    animation: particleExplosion 1.2s ease-out forwards;
}

@keyframes particleExplosion {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

.particle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor, 0 0 12px currentColor;
}

/* Particle trail effect */
.particle::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 10px;
    background: linear-gradient(to bottom, currentColor, transparent);
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
}
