/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
main {
    padding: 60px 0;
}

.category {
    margin-bottom: 50px;
}

.category h2 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

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

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #2d3748;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.tool-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #667eea;
}

.tool-card p {
    color: #64748b;
    font-size: 0.95rem;
}

/* CTA Section */
.cta-section {
    margin: 80px 0;
}

.cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.cta-card h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-card p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-card ul {
    list-style: none;
    text-align: left;
    display: inline-block;
    margin-bottom: 40px;
}

.cta-card li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-button.primary {
    background: white;
    color: #667eea;
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: #2d3748;
    color: #cbd5e0;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #4a5568;
}

/* Tool Pages Styles */
.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
}

.tool-header a:hover {
    background: rgba(255,255,255,0.3) !important;
    transform: translateY(-2px);
}

/* Navigation Menu */
nav a:hover {
    background: #edf2f7 !important;
    transform: translateY(-1px);
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tool-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.tool-content {
    padding: 60px 0;
}

.upload-zone {
    display: block;
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: white;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.1);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #667eea;
    background: #f7fafc;
}

.upload-zone:active {
    border-color: #5a67d8;
    background: #edf2f7;
    transform: scale(0.99);
}

.upload-zone.dragover {
    border-style: solid;
    background: #edf2f7;
}

.upload-icon {
    font-size: 4rem;
    color: #a0aec0;
    margin-bottom: 20px;
}

.upload-zone h3 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.upload-zone p {
    color: #64748b;
    font-size: 1.1rem;
}

.file-input {
    display: none;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.progress {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
    display: none;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.result {
    background: white;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    margin-top: 30px;
    display: none;
}

.error {
    background: #fed7d7;
    color: #c53030;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

.success {
    background: #c6f6d5;
    color: #22543d;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tools-list {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 20px;
    }

    .cta-card {
        padding: 30px 20px;
    }

    .cta-card h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 200px;
        text-align: center;
    }

    .upload-zone {
        padding: 40px 15px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
        text-align: center;
    }

    /* Show mobile-specific text on touch devices */
    .upload-desktop {
        display: none !important;
    }

    .upload-mobile {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 40px 0;
    }

    main {
        padding: 40px 0;
    }

    .category h2 {
        font-size: 1.5rem;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .tool-header a {
        font-size: 0.9rem !important;
        padding: 6px 12px !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden elements for development */
.hidden {
    display: none !important;
}

/* Coming Soon Badge */
.coming-soon {
    background: #ffa726;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

/* App Store Badges */
.app-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.app-badges a {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-badges a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.app-badges img {
    height: 50px;
    border-radius: 8px;
}

@media (max-width: 480px) {
    .app-badges img {
        height: 45px;
    }
}