/* Text Counter Tool Styles - Premium Navy-Gold Theme */

/* Base Styles */
:root {
    --navy: #1A2A44;
    --navy-light: #2A3A54;
    --navy-dark: #0A1A34;
    --gold: #D4AF37;
    --gold-light: #E4BF47;
    --gold-dark: #C49F27;
    --text-light: #F0F0F0;
    --text-dark: #333333;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --premium-gradient: linear-gradient(135deg, var(--navy) 0%, #2A3A64 100%);
    --gold-gradient: linear-gradient(135deg, var(--gold) 0%, #E4BF47 100%);
}

/* Tool Header Styles */
.tool-header {
    background: var(--premium-gradient);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tool-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../assets/images/pattern-dark.png');
    opacity: 0.1;
    z-index: 0;
}

.tool-header .container {
    position: relative;
    z-index: 1;
}

.premium-badge {
    background: var(--gold-gradient);
    color: var(--navy-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.premium-badge i {
    margin-right: 0.3rem;
}

.tool-title {
    margin: 0 auto;
    max-width: 800px;
}

.tool-title h1 {
    font-size: 2.5rem;
    margin: 0 0 0.5rem;
    color: var(--text-light);
    font-weight: bold;
}

.tool-title h1 i {
    margin-right: 0.5rem;
    color: var(--gold);
}

.title-underline {
    height: 3px;
    width: 80px;
    background: var(--gold);
    margin: 0.5rem auto 1.2rem;
    border-radius: 3px;
}

.tool-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Tool Content Section */
.tool-content {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.counter-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Input Section */
.input-section {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.input-section h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.input-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.action-btn {
    background-color: var(--navy);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.action-btn:hover {
    background-color: var(--navy-light);
}

.action-btn i {
    margin-right: 0.4rem;
}

#inputText {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    line-height: 1.5;
    transition: border-color 0.2s ease;
}

#inputText:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Results Section */
.results-section {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stats-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-card h2 {
    color: var(--navy);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    color: var(--gold);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--navy);
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* Keyword Section */
.keyword-section {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.keyword-section h2 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.keyword-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.control-group {
    display: flex;
    align-items: center;
}

.control-group label {
    margin-right: 0.5rem;
    font-weight: 500;
}

.control-input {
    width: 60px;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.keyword-results {
    overflow-x: auto;
}

#keywordTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#keywordTable th {
    background-color: var(--navy);
    color: white;
    text-align: left;
    padding: 0.8rem 1rem;
}

#keywordTable td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
}

#keywordTable tr:nth-child(even) {
    background-color: #f8f9fa;
}

#keywordTable tr:hover {
    background-color: #f0f0f0;
}

.empty-message {
    text-align: center;
    color: #888;
    padding: 2rem 0;
}

/* Features Section */
.features-section {
    padding: 3rem 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.features-section h2 {
    color: var(--navy);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.features-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--gold);
    margin: 0.8rem auto 0;
    border-radius: 3px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 0 1.5rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.feature-item h3 {
    color: var(--navy);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.feature-item p {
    color: #666;
    line-height: 1.5;
}

/* How To Use Section */
.how-to-section {
    padding: 3rem 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.how-to-section h2 {
    color: var(--navy);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.how-to-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--gold);
    margin: 0.8rem auto 0;
    border-radius: 3px;
}

.steps {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.step {
    display: flex;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    background-color: var(--gold);
    color: var(--navy);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-right: 1.5rem;
    margin-top: 0.2rem;
}

.step-content h3 {
    color: var(--navy);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.step-content p {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.faq-section h2 {
    color: var(--navy);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.faq-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--gold);
    margin: 0.8rem auto 0;
    border-radius: 3px;
}

.faq-items {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--navy);
}

.faq-question i {
    color: var(--gold);
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 0 1rem;
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tool-title h1 {
        font-size: 2rem;
    }
    
    .results-section {
        grid-template-columns: 1fr;
    }
    
    .keyword-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .input-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Animation for stats */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-value {
    animation: countUp 0.5s ease-out forwards;
}
