@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== MAIN CONTAINER STYLES ===== */
.web-tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', Arial, sans-serif;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.web-tool-container h2 {
    color: #333;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.web-tool-container p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* ===== PREMIUM HOMEPAGE STYLES ===== */
.premium-homepage {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 40px 20px;
}

.hero-section {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 20px;
}

.hero-title {
    font-size: 3.5em;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    max-width: 500px;
    margin: 0 auto;
}

.tools-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 80px;
}

.tool-card-premium {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.tool-card-premium:hover::before {
    left: 100%;
}

.tool-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.tool-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.tool-card-premium:hover .tool-icon-wrapper {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tool-icon {
    font-size: 28px;
    filter: brightness(0) invert(1);
}

.tool-card-premium h3 {
    color: white;
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
}

.tool-card-premium p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 400;
}

.tool-link-premium {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.tool-link-premium:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-highlight {
    text-align: center;
    padding: 20px;
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.feature-highlight h4 {
    color: white;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-highlight p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

/* ===== FORM STYLES ===== */
.tool-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e1e1e1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: 'Inter', Arial, sans-serif;
}

.form-control:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 5px rgba(0,124,186,0.3);
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin: 5px;
    transition: background-color 0.3s ease;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 500;
}

.btn-primary {
    background: #007cba;
    color: white;
}

.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #005a87;
}

.btn-secondary:hover {
    background: #545b62;
}

.tool-result {
    background: #e9f7ef;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #c3e6cb;
}

#qrcode {
    margin: 20px 0;
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#qrcode img {
    display: block;
    border-radius: 4px;
}

/* ===== WORD COUNTER SPECIFIC STYLES ===== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

/* ===== IMAGE TO TEXT (OCR) SPECIFIC STYLES ===== */
.image-preview {
    text-align: center;
    margin-bottom: 15px;
    min-height: 100px;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.extracted-text-container {
    background: white;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

#resultText {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

/* ===== PDF COMPRESSOR SPECIFIC STYLES ===== */
.tool-features {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
}

.feature-item h4 {
    color: #333;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
    font-size: 0.9em;
}

.external-tool-redirect {
    text-align: center;
    margin: 30px 0;
}

.redirect-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.redirect-card h3 {
    margin-bottom: 15px;
    font-size: 1.8em;
}

.redirect-card p {
    margin-bottom: 25px;
    font-size: 1.1em;
    opacity: 0.9;
}

.external-tool-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    padding: 15px 30px;
    font-size: 1.1em;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 20px;
}

.external-tool-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.redirect-info {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
}

.redirect-info p {
    margin: 0;
    font-size: 0.9em;
}

/* ===== YOUTUBE THUMBNAIL DOWNLOADER SPECIFIC STYLES ===== */
.thumbnail-preview {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.thumbnail-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.thumbnail-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    text-align: center;
}

.thumbnail-info p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/* ===== URL SHORTENER SPECIFIC STYLES ===== */
.url-result-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #007cba;
    border-radius: 6px;
    background: #f8f9fa;
    text-align: center;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
}

.url-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.url-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #007cba;
}

/* ===== IMAGE ENHANCER SPECIFIC STYLES ===== */
.image-enhancer-container {
    max-width: 1200px;
}

.image-enhancer-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 16px;
}

.image-upload-area {
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.image-upload-area:hover, .image-upload-area.dragover {
    border-color: #007cba;
    background-color: rgba(0, 124, 186, 0.05);
}

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 15px;
}

.upload-text {
    margin-bottom: 15px;
    color: #666;
}

.enhancer-options-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

.option-group {
    margin-bottom: 15px;
}

.option-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.enhancer-slider {
    width: 100%;
    padding: 0;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #007cba;
}

.image-comparison-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

@media (min-width: 768px) {
    .image-comparison-container {
        flex-direction: row;
    }
}

.image-panel {
    flex: 1;
    text-align: center;
}

.image-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.image-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    padding: 10px;
}

.image-wrapper img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 4px;
}

.no-image-text {
    color: #9ca3af;
    font-style: italic;
}

.image-info {
    font-size: 14px;
    color: #666;
}

.enhancer-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    color: white;
}

.processing-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

.format-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.format-btn {
    padding: 8px 15px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.format-btn.active {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
}

.format-btn:hover:not(.active) {
    border-color: #007cba;
}

/* ===== TEXT SUMMARIZER SPECIFIC STYLES ===== */
.text-stats {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

.summary-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e1e1e1;
    margin-bottom: 20px;
}

.summary-output {
    line-height: 1.6;
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* ===== TOOL INFO STYLES ===== */
.tool-info {
    background: #e7f3ff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid #007cba;
}

.tool-info h4 {
    margin-top: 0;
    color: #007cba;
}

.tool-info ul {
    text-align: left;
    margin-bottom: 0;
}

.tool-info li {
    margin-bottom: 5px;
}

/* ===== BACK TO HOME LINK ===== */
.back-to-home {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.back-to-home a {
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
}

.back-to-home a:hover {
    text-decoration: underline;
}

/* ===== TEXTAREA SPECIFIC STYLES ===== */
textarea.form-control {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .web-tool-container {
        margin: 10px;
        padding: 15px;
    }
    
    .premium-homepage {
        padding: 20px 15px;
    }
    
    .hero-title {
        font-size: 2.5em;
    }
    
    .hero-subtitle {
        font-size: 1.1em;
    }
    
    .tools-grid-premium {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .tool-card-premium {
        padding: 25px 20px;
    }
    
    .features-section {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .hero-section {
        margin-bottom: 40px;
        padding: 20px 0;
    }
    
    .tool-form {
        padding: 15px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-item {
        padding: 10px;
    }
    
    .result-value {
        font-size: 20px;
    }
    
    .enhancer-options-panel {
        grid-template-columns: 1fr;
    }
    
    .image-comparison-container {
        flex-direction: column;
    }
    
    .enhancer-action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .enhancer-action-buttons .btn-primary,
    .enhancer-action-buttons .btn-secondary {
        width: 100%;
        max-width: 300px;
        margin: 5px 0;
    }
    
    .image-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .url-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .url-actions .btn-primary,
    .url-actions .btn-secondary {
        width: 200px;
        margin: 5px 0;
    }
    
    .url-stats {
        grid-template-columns: 1fr;
    }
    
    .thumbnail-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thumbnail-actions .btn-primary,
    .thumbnail-actions .btn-secondary {
        width: 200px;
        margin: 5px 0;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .redirect-card {
        padding: 25px 20px;
    }
    
    .redirect-card h3 {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2em;
    }
    
    .tool-card-premium {
        padding: 20px 15px;
    }
    
    .tool-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .tool-icon {
        font-size: 24px;
    }
    
    .premium-homepage {
        padding: 15px 10px;
    }
}