/* Custom Styles for OnlineTools Website */

* {
    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;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.tool-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.15);
    border-color: #FF6B6B;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF7043 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

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

.file-input-label {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.file-input-label:hover {
    background: linear-gradient(135deg, #FF5252 0%, #FF7043 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

input[type="file"] {
    display: none;
}

.result-area {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    min-height: 200px;
}

textarea {
    font-family: 'Courier New', monospace;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}

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

.faq-question {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: #6b7280;
}

@media (max-width: 768px) {
    .tool-card {
        margin-bottom: 1rem;
    }
}

.canvas-container {
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

canvas {
    max-width: 100%;
    height: auto;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.alert-info {
    background-color: #FFF5F5;
    border: 1px solid #FEB2B2;
    color: #C53030;
}

/* Professional Logo Styling */
.logo-icon {
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
}

/* Enhanced navigation */
nav a {
    transition: color 0.2s ease;
}

/* Professional shadows and elevations */
.elevated {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.elevated-hover:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

/* Professional gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA726 100%);
}

.gradient-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
}

/* Loading states */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* HandyToolset Brand Colors */
:root {
    --primary-gradient-start: #FF6B6B;
    --primary-gradient-end: #FF8E53;
    --accent-gradient-start: #4ECDC4;
    --accent-gradient-end: #44A08D;
    --primary-hover: #FF5252;
    --text-primary: #2D3748;
    --text-secondary: #718096;
}

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

/* Professional card design */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Ad Container Styles */
.ad-container {
    margin: 1.5rem auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.ad-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.ad-responsive {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
}

/* Make ad iframes responsive */
.ad-container iframe,
.ad-wrapper iframe,
.ad-responsive iframe {
    display: block;
    margin: 0 auto;
    border: none;
}

/* Desktop - 728x90 Leaderboard */
@media (min-width: 769px) {
    .ad-container {
        min-height: 100px;
        padding: 5px 0;
    }
    
    .ad-responsive {
        max-width: 728px;
        min-height: 90px;
    }
}

/* Tablet and Mobile - 320x50 Mobile Banner */
@media (max-width: 768px) {
    .ad-container {
        min-height: 60px;
        padding: 5px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .ad-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .ad-responsive {
        width: 100%;
        max-width: 100%;
        min-height: 50px;
    }
    
    /* Allow iframe to be fully visible on mobile */
    .ad-container iframe,
    .ad-wrapper iframe,
    .ad-responsive iframe {
        max-width: 100%;
        width: auto !important;
        height: auto !important;
        min-width: 320px;
        min-height: 50px;
    }
}

/* Small mobile devices */
@media (max-width: 350px) {
    .ad-container {
        padding: 2px;
        min-height: 55px;
    }
    
    .ad-responsive {
        width: 100%;
    }
    
    .ad-container iframe,
    .ad-wrapper iframe,
    .ad-responsive iframe {
        min-width: 300px;
        transform-origin: center;
        transform: scale(0.95);
    }
}

/* Header Ad - 728x90 Leaderboard (Desktop) / 320x50 Mobile */
.ad-header {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}
