:root {
    --primary-color: #1e3a8a;
    --secondary-color: #2563eb;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --text-color: #1e293b;
    --background-color: #f1f5f9;
    --table-header-bg: #1e3a8a;
    --table-stripe-bg: #f8fafc;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-speed: 0.3s;
    --success-color: #10b981;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.03) 0%, transparent 700px),
        radial-gradient(circle at 80% 80%, rgba(30, 58, 138, 0.03) 0%, transparent 700px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

header {
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
    padding: 0;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 60%);
    pointer-events: none;
}

header:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.title-container {
    display: flex;
    align-items: center;
}

.title-container h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.last-change-inline {
    color: #ffffff;
    font-size: 1em;
    white-space: nowrap;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 8px;
    transition: all var(--transition-speed);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.clock {
    font-size: 1.4em;
    font-weight: 700;
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
    backdrop-filter: blur(5px);
    letter-spacing: 1px;
}

.clock:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.data-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.data-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.data-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

th, td {
    padding: 16px 20px;
    text-align: left;
}

th {
    background: linear-gradient(to right, var(--table-header-bg), var(--secondary-color));
    color: white;
    font-weight: 600;
    position: relative;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

th:first-child {
    border-top-left-radius: 10px;
}

th:last-child {
    border-top-right-radius: 10px;
}

tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

td {
    border-bottom: 1px solid #eee;
    font-size: 1rem;
    transition: all 0.2s ease;
}

tr:nth-child(even) {
    background-color: var(--table-stripe-bg);
}

tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

tr:hover td {
    color: var(--primary-color);
}

/* Examples Section */
.examples-section {
    margin-top: 30px;
    position: relative;
}

.toggle-examples-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-speed);
}

.toggle-examples-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.toggle-examples-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.toggle-examples-btn:hover i {
    transform: rotate(15deg);
}

.examples-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    display: none;
    position: relative;
    overflow: hidden;
}

.examples-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.examples-container.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.examples-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.examples-header h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.examples-description {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.examples-content {
    display: flex;
    gap: 20px;
}

.example-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.tab-btn {
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
}

.tab-btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-1px);
}

.tab-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.example-content {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.code-block {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 12px 15px;
    position: relative;
    border: 1px solid #e2e8f0;
    overflow: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
    max-height: 150px;
}

.code-block:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.07);
    border-color: #cbd5e1;
}

pre {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-break: break-all;
    color: #334155;
    margin: 0;
    padding-right: 40px; /* Space for copy button */
    line-height: 1.4;
    font-size: 0.85rem;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #f1f5f9;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.copy-btn:hover {
    background-color: #e2e8f0;
    color: var(--primary-color);
}

.copy-btn.copied {
    background-color: var(--success-color);
    color: white;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .header-left, .header-center, .header-right {
        width: 100%;
        justify-content: center;
    }

    .title-container {
        justify-content: center;
    }

    .examples-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .examples-content {
        flex-direction: column;
    }

    .example-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 10px 12px;
    }
}

/* Animação para atualizações */
@keyframes highlight {
    0% {
        background-color: rgba(52, 152, 219, 0.3);
    }
    100% {
        background-color: transparent;
    }
}

.highlight {
    animation: highlight 1s ease-out;
}

.last-change-inline.highlight {
    animation: highlight 1s ease-out;
}
