/* Calchub Word Counter - Minimalist Styles */
.calchub-word-counter-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Stats Grid */
.calchub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.stat-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 12px;
    color: #3b82f6;
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 6px;
    font-feature-settings: "tnum";
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Textarea */
.calchub-textarea-container {
    margin-bottom: 24px;
}

.calchub-text-input {
    width: 100%;
    min-height: 350px;
    padding: 24px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.7;
    color: #1e293b;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.calchub-text-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.1);
}

.calchub-text-input::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Action Buttons */
.calchub-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.calchub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
    min-width: 160px;
}

.calchub-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.calchub-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.calchub-btn-clear {
    background: #ffffff;
}

.calchub-btn-copy {
    background: #1e293b;
    color: white;
    border: 1.5px solid #1e293b;
}

.calchub-btn-copy:hover {
    background: #0f172a;
    border-color: #0f172a;
}

.btn-icon {
    font-size: 18px;
    line-height: 1;
}

/* Success message for copy */
.copy-success {
    animation: slideInOut 2.5s ease forwards;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
}

.copy-success.error {
    background: #ef4444;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.copy-success.warning {
    background: #f59e0b;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

@keyframes slideInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -20px);
        visibility: hidden;
    }
}

/* Loading state for copy button */
.calchub-btn-copy.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .calchub-word-counter-wrapper {
        padding: 16px;
    }

    .calchub-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 16px 10px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .calchub-text-input {
        min-height: 250px;
        padding: 18px;
        font-size: 15px;
        border-radius: 12px;
    }
    
    .calchub-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .calchub-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .calchub-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 12px 16px;
        gap: 15px;
    }
    
    .stat-icon {
        margin-bottom: 0;
        font-size: 28px;
        min-width: 40px;
    }
    
    .stat-value {
        font-size: 24px;
        margin-bottom: 0;
        min-width: 50px;
    }
    
    .stat-label {
        font-size: 13px;
        text-transform: none;
        margin-left: auto;
    }
    
    .calchub-text-input {
        min-height: 200px;
    }
}

/* Print styles */
@media print {
    .calchub-actions {
        display: none;
    }
    
    .stat-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}