/* ===================================
   Wordly Humanizer - Main Styles
   Theme: Inspired by Ryne AI (Blue)
   =================================== */

:root {
    /* Primary Colors - Blue Theme */
    --primary-blue: #00b4d8;
    --primary-blue-dark: #0077b6;
    --primary-blue-light: #48cae4;
    --accent-cyan: #90e0ef;
    --pale-blue: #caf0f8;
    
    /* Neutral Colors */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --gray: #adb5bd;
    --dark-gray: #495057;
    --black: #212529;
    
    /* Semantic Colors */
    --success: #06d6a0;
    --warning: #ffd60a;
    --danger: #ef476f;
    --info: #00b4d8;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    --gradient-light: linear-gradient(135deg, #caf0f8 0%, #ade8f4 100%);
    --gradient-dark: linear-gradient(135deg, #023e8a 0%, #03045e 100%);
    --gradient-hero: linear-gradient(135deg, #e1f5fe 0%, #ffffff 50%, #e1f5fe 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 180, 216, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 180, 216, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 180, 216, 0.2);
    --shadow-xl: 0 16px 48px rgba(0, 180, 216, 0.25);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-xxl: 4rem;
}

/* ===================================
   Reset & Base Styles
   =================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--black);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--black);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-blue-dark);
}

/* ===================================
   Container & Layout
   =================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-md);
}

/* ===================================
   Navigation Bar
   =================================== */

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

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

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-sm);
    align-items: center;
}

.nav-menu li a {
    padding: 0.6rem 1.2rem;
    color: var(--dark-gray);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.nav-menu li a:hover {
    color: var(--primary-blue);
    background: var(--pale-blue);
    transform: translateY(-2px);
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--black);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

/* ===================================
   Cards
   =================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-header {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--light-gray);
}

.card-body {
    margin-bottom: var(--space-md);
}

.card-footer {
    padding-top: var(--space-md);
    border-top: 1px solid var(--light-gray);
}

/* ===================================
   Forms
   =================================== */

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--black);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-sm);
    background: var(--white);
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.form-control::placeholder {
    color: var(--gray);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* ===================================
   Alerts & Messages
   =================================== */

.alert {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border-left: 4px solid;
}

.alert-success {
    background: #d1f2eb;
    border-color: var(--success);
    color: #0e6251;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: var(--pale-blue);
    border-color: var(--info);
    color: #014f86;
}

/* ===================================
   Tables
   =================================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    background: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

thead {
    background: var(--gradient-primary);
}

thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--white);
}

tbody tr {
    border-bottom: 1px solid var(--light-gray);
}

tbody tr:hover {
    background: var(--off-white);
}

tbody td {
    padding: 1rem;
    color: var(--dark-gray);
}

/* ===================================
   Grid System
   =================================== */

.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===================================
   Stats Cards
   =================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--dark-gray);
    font-weight: 600;
}

/* ===================================
   Badge
   =================================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
}

.badge-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.badge-success {
    background: var(--success);
    color: var(--white);
}

.badge-warning {
    background: var(--warning);
    color: var(--black);
}

.badge-danger {
    background: var(--danger);
    color: var(--white);
}

/* ===================================
   Utilities
   =================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.hidden { display: none !important; }

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

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

.highlight {
    color: var(--primary-blue);
    font-weight: 700;
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 180, 216, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* ===================================
   Loading States
   =================================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(0, 180, 216, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===================================
   Footer
   =================================== */

footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-lg);
    margin-top: var(--space-xxl);
}

footer a {
    color: var(--accent-cyan);
}

footer a:hover {
    color: var(--white);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin: var(--space-md) 0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 968px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
