/* Main CSS file for common styles */

/* Custom variables */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #2d2d2d;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    --info-color: #0984e3;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --body-bg: #f5f5f5;
    --card-bg: #ffffff;
    --text-muted: #6c757d;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Base styles */
body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease;
}

/* Header styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Card styles */
.card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Form styles */
.form-control {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: var(--surface-dark);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(108, 92, 231, 0.25);
}

.form-control::placeholder {
    color: var(--text-secondary);
}

/* Button styles */
.btn {
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--text-primary);
}

/* Tool container styles */
.tool-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Result container styles */
.result-container {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* History container styles */
.history-container {
    margin-top: 2rem;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease-in-out;
}

.history-item:hover {
    background-color: var(--light-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 2rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
    
    .result-container {
        padding: 1rem;
    }
}

/* Animation styles */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --body-bg: #1a1a1a;
        --card-bg: #2d2d2d;
        --text-color: #ffffff;
        --text-muted: #a0a0a0;
        --border-color: #404040;
    }
    
    .card {
        background-color: var(--card-bg);
    }
    
    .form-control {
        background-color: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
    
    .form-control:focus {
        background-color: var(--card-bg);
        color: var(--text-color);
    }
}

/* Global Styles */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --success-color: #00b894;
    --background-color: #f8f9fa;
    --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--background-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.navbar {
    box-shadow: var(--card-shadow);
}

/* Search Section */
.search-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    margin: -1.5rem -1.5rem 2rem -1.5rem;
    padding: 2rem 1.5rem;
}

.search-section .input-group {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Card Styles */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: var(--card-shadow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.card-title i {
    margin-right: 0.5rem;
}

/* Tool Categories */
.tool-category {
    padding: 2rem 0;
}

.tool-category h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Tool Cards */
.tool-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card .card-body {
    flex: 1;
}

.tool-card .card-footer {
    background: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .search-section {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1.5rem 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }
}

/* Footer Styles */
footer {
    background-color: #343a40;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Ad Spaces */
.ad-space {
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 1rem;
    text-align: center;
    margin: 1rem 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tool-specific styles */
.tool-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.tool-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tool-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Form Elements */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

/* Hero Image Styles */
.hero-image {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    transition: all 0.5s ease;
    transform-origin: center;
    animation: float 6s ease-in-out infinite;
}

.hero-image:hover {
    transform: translateY(-10px) scale(1.02);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Hero Section Styles */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(80, 200, 120, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: gradientShift 15s ease-in-out infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleFade 1s ease-out;
}

.hero .lead {
    font-size: 1.25rem;
    color: #6c757d;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero .btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

.hero .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.hero .btn-outline-primary {
    border: 2px solid #4a90e2;
    color: #4a90e2;
}

.hero .btn-outline-primary:hover {
    background: #4a90e2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.2);
}

@keyframes titleFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.1rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Lists */
.list-group-item {
    background-color: var(--surface-dark);
    border-color: var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(108, 92, 231, 0.1);
}

/* Tables */
.table {
    color: var(--text-primary);
}

.table thead th {
    border-bottom-color: var(--border-color);
    color: var(--text-secondary);
}

.table td, .table th {
    border-top-color: var(--border-color);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-primary {
    background-color: rgba(108, 92, 231, 0.1);
    color: var(--primary-color);
}

.alert-success {
    background-color: rgba(0, 184, 148, 0.1);
    color: var(--success-color);
}

.alert-warning {
    background-color: rgba(253, 203, 110, 0.1);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(214, 48, 49, 0.1);
    color: var(--danger-color);
}

/* Badges */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 6px;
    font-weight: 500;
}

/* Tooltips */
.tooltip {
    --bs-tooltip-bg: var(--surface-dark);
    --bs-tooltip-color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    .card {
        border: 1px solid #ddd;
    }
    
    .no-print {
        display: none;
    }
}

/* Ad container styles */
.ad-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ad-container.sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.ad-container.footer {
    margin-top: 2rem;
}

.ad-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive ad adjustments */
@media (max-width: 768px) {
    .ad-container.sidebar {
        position: static;
        margin-top: 1rem;
    }
    
    .ad-container {
        min-height: 60px;
        padding: 0.5rem;
    }
}

/* Ad loading animation */
.ad-container.loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
} 