/* ToolHub Base UI Styles */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.6;
    background: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header & Navigation */
.header {
    background: linear-gradient(120deg, #ff6b6b, #4ecdc4);
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.site-logo {
    height: 40px;
    width: auto;
    max-height: 40px;
    object-fit: contain;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffe66d;
}

/* Container & Layout */
.container {
    max-width: 1300px;
    margin: 100px auto 4rem;
    padding: 0 2rem;
}

.tool-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.tool-section h2 {
    color: #1e3c72;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tool-section p,
.tool-section ul,
.tool-section ol {
    margin-bottom: 1rem;
    text-align: left;
}

.tool-section h3 {
    color: #1e3c72;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 120px 2rem 60px;
}

.hero h1 {
    color: #1e3c72;
    font-size: clamp(24px, 5vw, 48px);
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(16px, 3vw, 20px);
    color: #666;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Content Section */
.content-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section h2 {
    color: #1e3c72;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.content-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 0;
}

.content-section li {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.content-section li:hover {
    transform: translateY(-5px);
}

.content-section a {
    color: #1e3c72;
    text-decoration: none;
    font-weight: 500;
}

.content-section a:hover {
    color: #00d4ff;
}

/* Form Elements */
input[type="file"],
select,
textarea,
input[type="text"] {
    padding: 10px;
    margin: 8px;
    font-size: clamp(12px, 3vw, 16px);
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    transition: border-color 0.3s ease;
}

input[type="file"]:focus,
select:focus,
textarea:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #00d4ff;
}

button {
    padding: 12px 24px;
    background: #00d4ff;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: clamp(12px, 3vw, 16px);
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    margin: 8px;
}

button:hover {
    background: #00b7d9;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* Ad Container */
.ad-container {
    margin: 2rem auto;
    max-width: 100%;
    text-align: center;
    padding: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(120deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer p {
    opacity: 0.9;
    transition: opacity 0.3s ease;
    margin-bottom: 0.8rem;
}

.footer p:hover {
    opacity: 1;
}

.footer a {
    color: white;
    text-decoration: none;
}

.footer a:hover {
    color: #ffe66d;
}

/* Cookie Consent */
#cookie-consent {
    position: fixed;
    bottom: 0;
    background: #333;
    color: #fff;
    padding: 15px;
    width: 100%;
    text-align: center;
    z-index: 1000;
}

#cookie-consent a {
    color: #ffe66d;
    text-decoration: underline;
}

#cookie-consent button {
    background: #00d4ff;
    border-radius: 5px;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border: none;
    color: white;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .container {
        margin: 80px 1rem 4rem;
        padding: 0 1rem;
    }

    .tool-section {
        margin: 20px auto;
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .header {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-links a {
        margin-left: 1.5rem;
    }
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
}

.tool-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.8rem 1.5rem;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    border-color: rgba(255,255,255,0.5);
}

.tool-card:active {
    transform: translateY(-4px) scale(0.98);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

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

.tool-card h3 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.tool-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.tool-card:hover .tool-icon {
    transform: scale(1.2) rotate(10deg);
}

.tool-card p {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Different gradient colors for variety */
.tool-card:nth-child(5n+1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tool-card:nth-child(5n+2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.tool-card:nth-child(5n+3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tool-card:nth-child(5n+4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.tool-card:nth-child(5n+5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Mobile touch feedback */
@media (hover: none) and (pointer: coarse) {
    .tool-card:active {
        transform: scale(0.95);
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    .tool-card:hover {
        transform: none;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }

/* Status & Result */
#status,
#result {
    margin-top: 10px;
    font-size: clamp(12px, 3vw, 16px);
}

#status {
    color: #2a5298;
}

#result {
    color: #333;
}

/* Loading & Progress */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #00d4ff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Error Messages */
.error-message {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 4px solid #e74c3c;
}

.success-message {
    color: #27ae60;
    background: #f2fdf2;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 4px solid #27ae60;
}
