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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 1s ease;
    position: relative;
    padding-bottom: 80px;
}

.button-logo {
    height: 24px;
    width: auto;
    vertical-align: middle;
    margin-left: 8px;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.3));
    transition: transform 0.2s ease;
}

#shredButton:hover .button-logo {
    transform: scale(1.05);
}

.container {
    text-align: center;
    max-width: 600px;
    width: 90%;
    padding: 2rem;
}

h1 {
    color: #8b5a2b;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}

p {
    color: rgba(139, 90, 43, 0.8);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    transition: all 0.5s ease;
}

.input-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 3rem;
}

#ideaInput {
    width: 100%;
    height: 120px;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
    font-family: inherit;
}

#ideaInput:focus {
    outline: none;
    border-color: #ff9a56;
    box-shadow: 0 0 10px rgba(255, 154, 86, 0.3);
}

#shredButton {
    background: linear-gradient(45deg, #ff9a56, #ff6b9d);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#shredButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 154, 86, 0.4);
}

#shredButton:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.animation-area {
    position: relative;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animation-area.visible {
    opacity: 1;
    transform: translateY(0);
}

.animation-area.fade-out {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.paper {
    position: absolute;
    width: 80px;
    height: 100px;
    background: white;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 1s ease-in-out;
}

.paper.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(-50px);
}

.paper.moving {
    transform: translateX(-50%) translateY(150px);
}

.paper.shredding {
    transform: translateX(-50%) translateY(200px) scale(0.8);
    opacity: 0.5;
}

.paper-content {
    padding: 8px;
    font-size: 8px;
    line-height: 1.2;
    overflow: hidden;
    height: 100%;
    word-wrap: break-word;
}

.shredder {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

.shredder-top {
    width: 100%;
    height: 25px;
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    border-radius: 12px 12px 0 0;
    position: relative;
    border: 2px solid #1a252f;
    border-bottom: none;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1);
}

.shredder-slot {
    width: 80px;
    height: 6px;
    background: linear-gradient(180deg, #000 0%, #1a252f 100%);
    margin: 0 auto;
    border-radius: 0 0 2px 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.1);
    position: relative;
    top: -2px;
}

.shredder-body {
    width: 100%;
    height: 70px;
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 50%, #1a252f 100%);
    position: relative;
    overflow: hidden;
    border: 2px solid #1a252f;
    border-top: none;
    border-bottom: none;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.shredder-blades {
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            90deg,
            #e74c3c 0px,
            #e74c3c 1px,
            #c0392b 1px,
            #c0392b 2px,
            #a93226 2px,
            #a93226 3px,
            #922b21 3px,
            #922b21 4px
        ),
        linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    animation: spin 0.08s linear infinite;
    opacity: 0;
    box-shadow: inset 0 0 20px rgba(231, 76, 60, 0.3);
}

.shredder-blades.active {
    opacity: 1;
}

@keyframes spin {
    from { transform: translateX(0); }
    to { transform: translateX(4px); }
}

.shredder-bin {
    width: 160px;
    height: 90px;
    background: linear-gradient(180deg, #95a5a6 0%, #7f8c8d 50%, #6c7b7d 100%);
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
    border: 2px solid #5d6d7e;
    border-top: none;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.2),
        0 3px 10px rgba(0,0,0,0.3);
}

.shredded-pieces {
    position: absolute;
    bottom: 5px;
    width: 95%;
    left: 2.5%;
    height: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            white 0px,
            white 1px,
            #f8f9fa 1px,
            #f8f9fa 2px,
            #e9ecef 2px,
            #e9ecef 3px,
            transparent 3px,
            transparent 4px
        ),
        linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.1) 100%);
    transition: height 0.5s ease-out, opacity 0.5s ease-out, visibility 0.5s ease-out;
    border-radius: 0 0 5px 5px;
    opacity: 0;
    visibility: hidden;
}

.shredded-pieces.filled {
    height: 35px;
    opacity: 1;
    visibility: visible;
}

.shredder-top::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2);
}

.shredder-top::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background: #1a252f;
    border-radius: 1px;
}

.collection-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 100px;
    overflow: hidden;
    pointer-events: none;
}

.shredded-paper-falling {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.shredded-paper-falling.active {
    opacity: 1;
}

.paper-strip {
    position: absolute;
    width: 3px;
    height: 15px;
    background: white;
    border-radius: 1px;
    animation: fall 2s ease-in forwards;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.paper-strip:nth-child(even) {
    background: #f8f9fa;
}

.paper-strip:nth-child(3n) {
    background: #e9ecef;
}

@keyframes fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(80px) rotate(360deg);
        opacity: 0.3;
    }
}

.message {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: #666;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
}

.message.hidden {
    opacity: 0;
    transform: translateY(-20px);
}

.stats-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(139, 90, 43, 0.2);
    padding: 1rem 2rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    z-index: 1000;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #8b5a2b;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(139, 90, 43, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.stat-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat-button {
    background: linear-gradient(45deg, #ff9a56, #ff6b9d);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 12px rgba(255, 154, 86, 0.4);
}

.stat-button.clear-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.stat-button.clear-btn:hover {
    box-shadow: 0 3px 12px rgba(231, 76, 60, 0.4);
}

body.dark-theme {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
}

body.dark-theme h1 {
    color: #e74c3c;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

body.dark-theme p {
    color: rgba(236, 240, 241, 0.7);
}

body.dark-theme .input-section {
    background: rgba(52, 73, 94, 0.8);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.dark-theme #ideaInput {
    background: #34495e;
    color: #ecf0f1;
    border-color: #5d6d7e;
}

body.dark-theme #ideaInput:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.3);
}

body.dark-theme .message {
    background: rgba(44, 62, 80, 0.9);
    color: #e74c3c;
}

body.dark-theme .stats-footer {
    background: rgba(52, 73, 94, 0.95);
    backdrop-filter: blur(10px);
    border-top-color: rgba(236, 240, 241, 0.2);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

body.dark-theme .stat-number {
    color: #e74c3c;
}

body.dark-theme .stat-label {
    color: rgba(236, 240, 241, 0.7);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .input-section {
        padding: 1.5rem;
    }
    
    .animation-area {
        height: 300px;
    }
    
    .stats-footer {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .stat-actions {
        justify-content: center;
    }
}