/* Tool Section Styling */
.tool-section {
    border: 2px solid red;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    padding: 32px;
    max-width: 800px;
    margin: 32px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tool Header */
.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.tool-title h1 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.tool-subtitle {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 400;
}

/* Tool Description */
.tool-description {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 32px;
    border-left: 4px solid #667eea;
}

.tool-description p {
    margin: 0;
    color: #34495e;
    line-height: 1.6;
}

/* Palindrome Container */
.palindrome-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

/* Form Styling */
#palindrome-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.input-group label i {
    color: #667eea;
}

.input-wrapper {
    position: relative;
}

#palindromeInput {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

#palindromeInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

/* Input Actions */
.input-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* Check Button */
.check-btn-container {
    display: flex;
    justify-content: center;
}

#checkBtn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    min-width: 200px;
}

#checkBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

#checkBtn:active {
    transform: translateY(0);
}

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-display {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.result-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6c757d;
    font-size: 16px;
}

.result-placeholder i {
    font-size: 20px;
    color: #adb5bd;
}

.result-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #27ae60;
    color: #155724;
    font-weight: 600;
    font-size: 18px;
    animation: successPulse 0.6s ease-in-out;
}

.result-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #e74c3c;
    color: #721c24;
    font-weight: 600;
    font-size: 18px;
    animation: errorShake 0.6s ease-in-out;
}

/* Analysis Details */
.analysis-details {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.detail-value {
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    max-width: 60%;
    text-align: right;
    word-break: break-all;
}

/* Examples Section */
.examples-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.examples-section h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.examples-section h3 i {
    color: #f39c12;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.example-btn {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Courier New', monospace;
}

.example-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Fun Facts */
.fun-facts {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.fun-facts h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.fun-facts h3 i {
    color: #f39c12;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.fact-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.fact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.fact-card i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 16px;
}

.fact-card h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.fact-card p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
    font-size: 14px;
}

/* Tool Footer */
.tool-footer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #27ae60;
}

.tool-footer p {
    margin: 0;
    color: #34495e;
    line-height: 1.6;
}

/* Animations */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-section {
        margin: 16px;
        padding: 20px;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .input-actions {
        flex-direction: column;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .detail-value {
        max-width: 100%;
        text-align: left;
    }
    
    #checkBtn {
        min-width: auto;
        width: 100%;
    }
}

/* Result Content */
.result-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.result-content i {
    font-size: 24px;
}

/* Loading state */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
} 