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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    transition: background 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
    transition: all 0.3s ease;
}

body.dark-mode .container {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

h2 {
    color: #333;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.dark-mode h2 {
    color: #fff;
}

h2 i {
    color: #667eea;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.theme-toggle:hover {
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

body.dark-mode .theme-toggle {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
}

textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 16px;
    resize: vertical;
    transition: all 0.3s ease;
    color: #333;
    background: #f9f9f9;
}

body.dark-mode textarea {
    background: #2a2a2a;
    color: #fff;
    border-color: #444;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

body.dark-mode textarea:focus {
    border-color: #ffd89b;
    box-shadow: 0 0 0 3px rgba(255, 216, 155, 0.1);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    animation-delay: 0.3s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-card i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    animation: countUp 0.3s ease;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.clear-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.clear-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.4);
}

.clear-btn:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .container {
        padding: 25px;
    }

    h2 {
        font-size: 22px;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}