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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.tool-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tool-card h2 {
    font-size: 1.25rem;
    margin: 0;
    color: #2c3e50;
}

.tool-card p {
    font-size: 0.9rem;
    margin: 0;
    color: #6c757d;
    line-height: 1.4;
}

/* New styles for feature descriptions */
.feature-description {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.feature-description h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-description p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.feature-description ul {
    list-style-type: none;
    padding-left: 0;
}

.feature-description li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-description li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.section-title {
    color: #2c3e50;
    margin: 1rem 0 1rem;
    text-align: center;
    font-size: 2rem;
}

.tool-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Estilos para as páginas de ferramentas */
.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-input {
    width: 100%;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.tool-input:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.tool-output {
    width: 100%;
    padding: 1rem;
    margin: 1rem 0;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    min-height: 100px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#addtoany {
    display: flex;
    justify-content: center;
}

/* Button Styles */
.btn {
    background-color: #3498db;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}


.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #3498db;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Estilos específicos para calculadora de horas */
.time-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.time-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Hangman Game Styles */
.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.game-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.game-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.keyboard-btn {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 2.5rem;
}

.keyboard-btn:hover {
    background-color: #e9ecef;
}

.keyboard-btn:disabled {
    background-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
}

.word-display {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-family: monospace;
}

.guesses {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.1rem;
    color: #6c757d;
}

/* Header Styles */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container a {
    text-decoration: none;
}

.logo-text {
    font-family: 'Playwrite HR Lijeva', cursive;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin: 0;
    padding: 10px 0;
}

.logo {
    display: none;
}

.main-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3498db;
}

/* Burger Menu Styles */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: #2c3e50;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.burger-menu.active span:first-child {
    transform: rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Search Bar */
.search-container {
    background-color: #f8f9fa;
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    padding: 0 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #2980b9;
}

/* Ad Container */
.ad-container {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.ad-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    border-radius: 4px;
}

.tool-options {
    max-width: 600px;
    margin: 0 auto 1rem;
}

/* Custom checkbox styles */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    display: none; /* Hides the default checkbox */
}

.checkbox-group label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.checkbox-group label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #3498db;
    background-color: #fff;
    border-radius: 6px; /* Rounded edges */
    transition: 0.2s ease-in-out; /* Simplified transition */
}

.checkbox-group input[type="checkbox"]:checked + label:before {
    background-color: #3498db;
    border-color: #3498db;
}

.checkbox-group input[type="checkbox"]:checked + label:after {
    content: '';
    position: absolute;
    left: 7px;
    top: 45%;
    transform: translateY(-50%) rotate(45deg);
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
}

.checkbox-group label:hover:before {
    border-color: #2980b9; /* Hover effect */
}


/* Novo estilo para organizar as opções de formato */
.radio-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem auto;
    flex-wrap: wrap;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-container .radio-group label {
    white-space: nowrap;
}

/* Em telas pequenas, empilhar verticalmente os grupos */
@media (max-width: 600px) {
    .radio-container {
        flex-direction: column;
        align-items: flex-start; /* alterado de center para flex-start */
        gap: 1rem;
    }
}

/* About Page Styles */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    margin-bottom: 5rem;
    padding: 20px;
}

.about-content h2 {
    color: #333;
    margin-top: 30px;
    margin-bottom: 15px;
}

.updates-list {
    list-style: none;
    padding: 0;
}

.updates-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* Contact Page Styles */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.contact-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #2980b9;
}

/* QR Code Generator Styles */
.qr-generator-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-size: 0.9rem;
    color: #2c3e50;
    font-weight: 500;
}

.select-input {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

.color-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input {
    width: 50px;
    height: 35px;
    padding: 0;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
}

.hex-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: monospace;
    text-transform: uppercase;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.button-group .btn {
    flex: 1 1 auto;
    min-width: 120px;
}

.qr-preview-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

#qrcode {
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrcode img {
    max-width: 100%;
    height: auto;
    animation: fadeIn 0.3s ease-out;
}

/* GA4 URL Builder Styles */
.parameters-info {
    margin: 2rem 0;
    background: #ffffff;
    padding: 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.parameters-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.parameters-table th,
.parameters-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.parameters-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.parameter-code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.example-code {
    background: #f1f3f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.url-protocol-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-protocol {
    width: 100px;
    flex-shrink: 0;
}

.url-input {
    flex-grow: 1;
}

.generated-url {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
    word-break: break-all;
}

.copy-btn {
    margin-top: 1rem;
}

.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

/* GA4 URL Builder Table Styles */
.params-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.params-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.params-table th,
.params-table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.params-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.params-table td {
    vertical-align: top;
}

.params-table code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

/* Form Controls */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Input with unit group */
.input-unit-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.form-control.with-unit {
    flex: 1;
    border-radius: 6px;
}

.unit-select {
    width: 120px; /* increased from 80px */
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background-color: #f8f9fa;
    color: #2c3e50;
    font-size: 1rem;
    cursor: pointer;
}

.unit-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.1);
}

/* IMC Calculator Styles */
.imc-form {
    max-width: 500px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mid Form Style */
.mid-form {
    max-width: 650px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.result.show {
    display: block;
}

.result-normal { 
    background-color: #d4edda; 
    color: #155724; 
}

.result-warning { 
    background-color: #fff3cd; 
    color: #856404; 
}

.result-danger { 
    background-color: #f8d7da; 
    color: #721c24; 
}

.imc-table {
    margin-top: 2rem;
    width: 100%;
    border-collapse: collapse;
}

.imc-table th, 
.imc-table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.imc-table th {
    background-color: #f8f9fa;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.alert h3 {
    color: inherit;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.alert p {
    margin-bottom: 1rem;
}

.alert ul {
    margin-bottom: 0;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .main-nav {
        display: none;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .main-nav.active {
        display: flex;
        flex-direction: column;
    }

    .main-nav a {
        padding: 0.5rem;
        width: 100%;
    }

    .header-content {
        flex-wrap: wrap;
    }

    /* Responsive table styles */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .params-table table {
        display: block;
        width: 100%;
    }

    .params-table thead {
        display: none;
    }

    .params-table tr {
        margin-bottom: 1rem;
        display: block;
        border: 1px solid #ddd;
        padding: 1rem;
        border-radius: 4px;
        background: #fff;
    }

    .params-table td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        position: relative;
        padding-left: 50%;
        border: none;
    }

    .params-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        text-align: left;
        font-weight: bold;
    }

    .params-table td:not(:last-child) {
        border-bottom: 1px solid #eee;
    }

    /* Responsive comparison table styles */
    .comparison-table {
        margin: 1rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .comparison-table table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table th,
    .comparison-table td {
        white-space: nowrap;
        min-width: 120px;
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        position: sticky;
        left: 0;
        background: inherit;
        z-index: 1;
    }

    .comparison-table th:first-child {
        background: #f8f9fa;
    }

    .comparison-table td:first-child {
        background: #ffffff;
    }

    .best-value-row td:first-child {
        background: #e8f5e9;
    }
}

@media (max-width: 600px) {
    .tool-input-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* QR Code animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Styles */
.filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px 0;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* New styles for categorized layout */
.tools-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tools-category {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tools-category h2 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tools-list a {
    color: #2c3e50;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60px;
}

.tools-list a:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    border-color: #3498db;
    color: #3498db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .tools-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}
