/*
Theme Name: Uniconvert Theme
Theme URI: https://uniconverthub.com
Author: UniconvertHub Team
Author URI: https://uniconverthub.com
Description: A professional, responsive theme for AI and Utility tools.
Version: 3.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: uniconvert-theme
*/

:root {
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    /* Violet 500 */
    --accent-color: #f43f5e;
    /* Rose 500 */
    --bg-color: #f3f4f6;
    /* Gray 100 */
    --card-bg: #ffffff;
    --text-color: #1f2937;
    /* Gray 800 */
    --text-light: #6b7280;
    /* Gray 500 */
    --border-color: #e5e7eb;
    --header-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.03em;
}

.logo-text .highlight {
    color: var(--primary-color);
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.btn-login {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    margin-right: 1rem;
    font-size: 0.95rem;
}

.btn-login:hover {
    color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-primary.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

/* Page Layout */
.page-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Category Sections */
.tools-category {
    margin-bottom: 2.5rem;
}

.category-header {
    background: var(--header-gradient);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: 0;
}

.category-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.category-header p {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Tool Cards */
.tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: var(--primary-color);
    border-radius: 0.5rem;
}

.tool-info {
    flex-grow: 1;
    min-width: 0;
}

.tool-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tool-card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-indent: -9999px;
}

/* Badges */
.badge-new {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 0 0.5rem 0 0.5rem;
    z-index: 1;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-list a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background: #1f2937;
    color: #e5e7eb;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-col a {
    color: #9ca3af;
    text-decoration: none;
}

.footer-col a:hover {
    color: white;
}

/* Pricing Section */
.pricing-section {
    padding: 2rem 0 4rem;
    margin-top: 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pricing-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border: 2px solid var(--primary-color);
    position: relative;
    background: linear-gradient(to bottom, #ffffff, #f5f3ff);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.pricing-card .text-primary {
    color: var(--primary-color);
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    color: #4b5563;
}

.features-list li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.btn-outline {
    background: #f3f4f6;
    color: var(--text-color);
}

.btn-outline:hover {
    background: #e5e7eb;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

#tool-result {
    margin-top: 1rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

#tool-loading {
    display: none;
    margin-top: 1rem;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
}

#tool-error {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .page-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-container {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        align-items: flex-start;
        gap: 1.5rem;
    }

    .nav-container.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.1rem;
    }

    .user-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .btn-login {
        margin: 0;
    }

    .btn-primary.btn-sm {
        text-align: center;
        display: block;
        width: 100%;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }

    .pricing-card {
        max-width: 100%;
        /* Full width on mobile */
    }
}

/* Tool Page Specific Styles */
.tool-page-container {
    padding: 4rem 0;
}

.tool-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.tool-title {
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .tool-page-container {
        padding: 2rem 0;
    }

    .tool-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .uniconvert-tool-form textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .btn-primary {
        width: 100%;
        display: block;
        text-align: center;
    }
}