* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #000;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    color: #888;
    transition: all 0.3s ease;
    padding-bottom: 40px;
}

body.global-dragover {
    background-color: #0a0a0a;
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.05);
}

body.global-dragover::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 20px;
    pointer-events: none;
    z-index: 1000;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        border-color: rgba(255, 255, 255, 0.15);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.3);
    }
}

.container {
    width: 100%;
    height: 100vh;
    max-width: 1200px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.monster-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.purple-monster {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.purple-monster:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.ghost-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.ghost-video.playing {
    opacity: 1;
    pointer-events: none;
    z-index: 15;
}

h1 {
    color: #666;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 700;
}

.upload-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 32px 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    z-index: 10;
}

.upload-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.upload-container.dragover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.01);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    opacity: 0.4;
}

.browse-text {
    color: #999;
    text-decoration: underline;
    cursor: pointer;
}

.file-types {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

#originalCanvas {
    position: fixed;
    left: 50%;
    top: 0;
    z-index: 20;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

#shreddedCanvas {
    position: fixed;
    left: 50%;
    top: 0;
    z-index: 10;
    transition: opacity 0.3s;
    pointer-events: none;
    display: none;
}

.shred-line {
    position: fixed;
    width: 100vw;
    height: 1px;
    top: 50%;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 25;
    pointer-events: none;
}

.dotted-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* Unified button style for all main actions */
.shred-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    background: #222;
    color: #aaa;
    border: 1px solid #333;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    position: relative;
}

.shred-btn:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #444;
}

.shred-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    margin: auto;
}

.controls {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #222;
    color: #aaa;
}

.btn:hover {
    background: #2a2a2a;
    color: #fff;
}

.btn.secondary {
    background: #1a1a1a;
    color: #777;
}

.btn.secondary:hover {
    background: #222;
    color: #999;
}

.post-shred-controls {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: none;
    gap: 8px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.post-shred-controls.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.post-shred-controls .shred-btn {
    width: auto;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    gap: 6px;
}

.post-shred-controls .shred-btn svg {
    width: 18px;
    height: 18px;
}

.btn-label {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.post-shred-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 10px;
    cursor: pointer;
}

.post-shred-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.download-btn {
    background: #222;
    color: #aaa;
    border: 1px solid #333;
    border-radius: 10px;
    cursor: pointer;
}

.download-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

.shred-another-btn {
    background: #222;
    color: #aaa;
    border: 1px solid #333;
    border-radius: 10px;
}

.shred-another-btn:hover {
    background: #2a2a2a;
    color: #fff;
}

.shred-btn-container {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: none;
    gap: 8px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
}

.shred-btn-container.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.shred-btn-container .shred-btn {
    width: auto;
    height: 40px;
    padding: 0 20px;
    border-radius: 20px;
    gap: 6px;
}

.shred-btn-container .shred-btn svg {
    width: 18px;
    height: 18px;
}

.tooltip {
    position: absolute;
    left: 50%;
    bottom: 110%;
    transform: translateX(-50%) translateY(0);
    background: rgba(20, 20, 20, 0.95);
    color: #aaa;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 100;
    border: 1px solid #333;
}

.shred-btn:hover .tooltip,
.shred-btn:focus .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Credit link styling */
.credit {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1000;
    pointer-events: auto;
}

.credit a {
    color: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    transition: all 0.2s ease;
    padding: 6px 10px;
    border-radius: 6px;
    background: transparent;
}

.credit a:hover {
    color: rgba(255, 255, 255, 0.5);
}
