/* ================================
   Character Counter Tool Styles
   ================================ */

/* Root Variables */
:root {
    --primary-color: #C62E2E;
    --secondary-color: #1e1e1e;
    --accent-color: #C1E172;
    --background-color: #f8f9fa;
    --text-dark: #1e1e1e;
    --text-muted: #6c757d;
    --white: #ffffff;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-color);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02525 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
}

/* Tool Section */
.tool-section {
    padding: 60px 0;
}

.tool-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    margin-bottom: 40px;
}

.tool-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.platform-selector {
    flex: 1;
    min-width: 250px;
}

.platform-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.platform-dropdown {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background-color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.platform-dropdown:hover {
    border-color: var(--primary-color);
}

.platform-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.custom-limit-container {
    flex: 1;
    min-width: 250px;
}

.custom-limit-container label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.custom-limit-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.custom-limit-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

/* Text Input Container */
.text-input-container {
    position: relative;
    margin-bottom: 30px;
}

.text-input {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

.text-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(198, 46, 46, 0.1);
}

.text-input.over-limit {
    border-color: var(--danger-color);
    background-color: #fff5f5;
}

.text-input.over-limit:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Stats Overlay */
.stats-overlay {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 100px;
    padding: 10px;
}

.stat-label-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-remaining {
    color: var(--success-color);
}

.stat-remaining.warning {
    color: var(--warning-color);
}

.stat-remaining.danger {
    color: var(--danger-color);
}

/* Progress Container */
.progress-container {
    margin-bottom: 25px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color) 0%, var(--accent-color) 100%);
    border-radius: 20px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.progress-fill.warning {
    background: linear-gradient(90deg, var(--warning-color) 0%, #ffdb4d 100%);
}

.progress-fill.danger {
    background: linear-gradient(90deg, var(--danger-color) 0%, #ff4d4d 100%);
}

.status-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.status-message.warning {
    color: var(--warning-color);
    font-weight: 600;
}

.status-message.danger {
    color: var(--danger-color);
    font-weight: 700;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-secondary,
.btn-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--text-dark);
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary:disabled,
.btn-warning:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Additional Stats */
.additional-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
}

.stat-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-detail div {
    display: flex;
    flex-direction: column;
}

.stat-detail strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-detail span {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 700;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* How To Section */
.how-to-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #a02525 100%);
    color: var(--white);
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.step-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Platform Limits Section */
.platform-limits-section {
    padding: 80px 0;
    background-color: var(--white);
}

.limits-table {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.limit-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 20px;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.limit-row:last-child {
    border-bottom: none;
}

.limit-header {
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.limit-row:not(.limit-header):hover {
    background-color: #f8f9fa;
}

.limit-platform strong {
    font-weight: 700;
    color: var(--text-dark);
}

.limit-type {
    color: var(--text-muted);
}

.limit-count {
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #000 100%);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 35px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.btn-primary,
.btn-secondary-cta {
    display: inline-block;
    padding: 16px 36px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #a02525;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(198, 46, 46, 0.3);
}

.btn-secondary-cta {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary-cta:hover {
    background-color: var(--white);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.cta-app-link {
    margin-top: 20px;
}

.cta-app-link p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.cta-app-link a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

.cta-app-link a:hover {
    color: var(--white);
}

/* Content Section */
.content-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.content-article h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.content-article h3 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.content-article p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* FAQ Section */
.faq-section {
    padding: 80px 0;
    background-color: var(--white);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--white);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .tool-card {
        padding: 25px;
    }
    
    .tool-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-row {
        gap: 10px;
    }
    
    .stat-box {
        min-width: 80px;
        padding: 5px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-secondary,
    .btn-warning {
        width: 100%;
        justify-content: center;
    }
    
    .additional-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .limit-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px 20px;
    }
    
    .limit-count {
        text-align: left;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary-cta {
        width: 100%;
        text-align: center;
    }
    
    .content-article {
        padding: 30px 20px;
    }
    
    .content-article h2 {
        font-size: 1.8rem;
    }
    
    .content-article h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .text-input {
        min-height: 200px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}