/* ========================================
   Word Counter Tool - Styles
   Profilioo.com
   ======================================== */

/* CSS Variables */
:root {
    --primary-blue: #2563eb;
    --dark-blue-hover: #1d4ed8;
    --purple-accent: #7c3aed;
    --background: #ffffff;
    --light-section-bg: #f8fafc;
    --main-text: #1f2937;
    --muted-text: #6b7280;
    --soft-border: rgba(0, 0, 0, 0.08);
    --success-green: #10b981;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-section-bg);
    color: var(--main-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Card */
.card {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--soft-border);
    width: 100%;
    max-width: 900px;
    padding: 40px;
    animation: fadeIn 0.4s ease;
    position: relative;
}

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

/* Card Header */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--main-text);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-blue), var(--purple-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1rem;
    color: var(--muted-text);
}

/* Input Section */
.input-section {
    margin-bottom: 32px;
}

/* Text Input */
.text-input {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--main-text);
    background: var(--light-section-bg);
    border: 2px solid var(--soft-border);
    border-radius: var(--radius-md);
    resize: vertical;
    transition: var(--transition);
    font-family: inherit;
}

.text-input::placeholder {
    color: var(--muted-text);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--background);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--purple-accent));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue-hover), var(--purple-accent));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--main-text);
    border: 1px solid var(--soft-border);
}

.btn-secondary:hover {
    background: var(--light-section-bg);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

/* Stats Section */
.stats-section {
    padding-top: 8px;
}

.stats-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--main-text);
    margin-bottom: 16px;
    text-align: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Stat Card */
.stat-card {
    background: var(--background);
    border: 1px solid var(--soft-border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Stat Icon */
.stat-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.words-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
}

.chars-icon {
    background: rgba(124, 58, 237, 0.1);
    color: var(--purple-accent);
}

.chars-no-space-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-green);
}

.sentences-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.paragraphs-icon {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.reading-icon {
    background: rgba(6, 182, 212, 0.1);
    color: #06b6d4;
}

/* Stat Value */
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--main-text);
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Stat Label */
.stat-label {
    font-size: 0.875rem;
    color: var(--muted-text);
    font-weight: 500;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--main-text);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastSlideUp 0.3s ease;
    z-index: 1000;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-icon {
    width: 20px;
    height: 20px;
    color: var(--success-green);
}

.toast-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        padding: 20px 16px;
    }

    .card {
        padding: 24px;
    }

    .title {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .text-input {
        min-height: 200px;
        padding: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

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

    .stat-card {
        padding: 20px 12px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8125rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}
