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

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a463f5;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --dark-color: #2d3436;
    --light-color: #f5f6fa;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    color: var(--dark-color);
    position: relative;
    overflow-x: hidden;
}

/* Efeito de estrelas */
.stars, .twinkling {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: -1;
}

.stars {
    background: #000 url('http://www.script-tutorials.com/demos/360/images/stars.png') repeat top center;
    z-index: -2;
}

.twinkling {
    background: transparent url('http://www.script-tutorials.com/demos/360/images/twinkling.png') repeat top center;
    z-index: -1;
    animation: move-twink-back 200s linear infinite;
}

@keyframes move-twink-back {
    from {background-position: 0 0;}
    to {background-position: -10000px 5000px;}
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 0.5rem;
}

.title i {
    font-size: 2.5rem;
    margin: 0 1rem;
    color: var(--warning-color);
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
}

.date-display {
    text-align: center;
    font-size: 1.2rem;
    color: white;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    align-self: center;
}

.date-display i {
    margin-right: 0.5rem;
}

.frase-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.frase-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 800px;
    width: 100%;
    margin: 2rem 0;
    position: relative;
    animation: fadeIn 0.5s ease-out;
    backdrop-filter: blur(10px);
}

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

.quote-icon {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 4rem;
    color: rgba(108, 92, 231, 0.1);
}

.frase-content {
    position: relative;
    z-index: 1;
}

.frase-text {
    font-size: 1.0rem;
    line-height: 1.6;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.frase-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid rgba(108, 92, 231, 0.1);
    padding-top: 1.5rem;
}

.frase-author {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.frase-author::before {
    content: "— ";
}

.frase-category {
    background: var(--gradient);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    background: #5b4bc4;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.6);
}

.btn-secondary {
    background: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(164, 99, 245, 0.4);
}

.btn-secondary:hover {
    background: #9452e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(164, 99, 245, 0.6);
}

.btn-admin {
    background: var(--dark-color);
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.4);
}

.btn-admin:hover {
    background: #1e2729;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 52, 54, 0.6);
}

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

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

.motivation-message {
    text-align: center;
    color: white;
    margin-top: 3rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Admin Styles */
.admin-body {
    background: #f5f6fa;
}

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

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.header-content h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.header-content h1 i {
    margin-right: 0.5rem;
}

.header-content p {
    color: #666;
}

.btn-back {
    padding: 0.8rem 1.5rem;
    background: var(--dark-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #1e2729;
    transform: translateX(-5px);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
    padding: 1rem;
    border-radius: 50%;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    display: block;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-box {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box i {
    color: #999;
}

.search-box input {
    border: none;
    padding: 0.5rem;
    width: 250px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease-out;
}

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

.form-container.hidden {
    display: none;
}

.form-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.frases-table {
    width: 100%;
    border-collapse: collapse;
}

.frases-table th {
    background: var(--gradient);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 500;
}

.frases-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.frases-table tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-edit,
.btn-delete {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

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

.btn-edit:hover {
    background: #e0aa3e;
}

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

.btn-delete:hover {
    background: #b71c1c;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    color: var(--dark-color);
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: none;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--success-color);
}

.notification.show {
    display: block;
}

.notification.error {
    border-left-color: var(--danger-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .frase-text {
        font-size: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 150px;
    }
}

/* ===== BOTÕES DE NAVEGAÇÃO COM EFEITO GLOW ===== */
.navigation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto 2rem auto;
    width: 100%;
    max-width: 500px;
    padding: 0 0.5rem;
}

.btn-nav {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.btn-nav::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-nav:hover {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-nav:hover::after {
    opacity: 1;
}

.btn-nav:active {
    transform: scale(0.95);
}

.date-display {
    text-align: center;
    font-size: 1.1rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
    transition: all 0.3s ease;
    flex: 0 1 auto;
}

.date-display i {
    color: var(--warning-color);
    font-size: 1rem;
}

/* Ajustes específicos para mobile */
@media (max-width: 600px) {
    .navigation-container {
        gap: 0.75rem;
        padding: 0 0.25rem;
    }
    
    .btn-nav {
        min-width: 40px;
        min-height: 40px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .date-display {
        font-size: 1rem;
        padding: 0.4rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .navigation-container {
        gap: 0.5rem;
    }
    
    .btn-nav {
        min-width: 38px;
        min-height: 38px;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .date-display {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }
    
    .date-display i {
        font-size: 0.85rem;
    }
}

/* Para telas muito pequenas */
@media (max-width: 360px) {
    .navigation-container {
        gap: 0.4rem;
    }
    
    .btn-nav {
        min-width: 35px;
        min-height: 35px;
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    .date-display {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Estilos de Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    background: rgba(108, 92, 231, 0.1);
    padding: 1rem;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
}

.login-error {
    background: #fee;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.4);
}

.btn-back-home {
    display: block;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.btn-back-home:hover {
    color: var(--primary-color);
}

.login-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.9rem;
}

.login-info i {
    margin-right: 0.3rem;
}

/* Header actions */
.header-actions {
    display: flex;
    gap: 1rem;
}

.btn-logout {
    padding: 0.8rem 1.5rem;
    background: var(--danger-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: #b71c1c;
    transform: translateX(5px);
}

.form-hint {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    font-style: italic;
}

/* Botão da API */
.btn-api {
    background: #00b894;
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
}

.btn-api:hover {
    background: #00a884;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.6);
}

/* Ajuste para mobile */
@media (max-width: 768px) {
    .btn-api {
        width: 100%;
        justify-content: center;
    }
}

/* Garantir que o loading e conteúdo respeitem o hidden */
.hidden {
    display: none !important;
}

/* Ajuste para o conteúdo da frase */
.frase-content-wrapper {
    animation: fadeIn 0.3s ease-out;
}

/* Melhorias no card para suportar loading */
.frase-card {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--primary-color);
    width: 100%;
}

.loading-spinner i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

.loading-spinner span {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Ajuste para a data */
.date-full, .date-short {
    transition: all 0.3s ease;
}

/* Ajuste para mobile */
@media (max-width: 480px) {
    .frase-card {
        min-height: 250px;
        padding: 2rem 1.5rem;
    }
    
    .loading-spinner i {
        font-size: 2.5rem;
    }
    
    .loading-spinner span {
        font-size: 1rem;
    }
}

/* ===== MELHORIAS NO RODAPÉ ===== */
footer {
    margin-top: auto;
    text-align: center;
}

.motivation-message {
    text-align: center;
    color: white;
    margin: 2rem 0 0.5rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    padding: 0.5rem 0 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.copyright p {
    transition: color 0.3s ease;
}

.copyright p:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Ajuste para o loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--primary-color);
    width: 100%;
}

.loading-spinner i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* ===== MELHORIAS NO RODAPÉ ===== */
footer {
    margin-top: auto;
    text-align: center;
}

.motivation-message {
    text-align: center;
    color: white;
    margin: 2rem 0 0.5rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.copyright {
    text-align: center;
    padding: 0.5rem 0 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 1rem;
}

.copyright a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.copyright a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.copyright a:active {
    transform: translateY(0);
}

/* Ajuste para o loading spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    color: var(--primary-color);
    width: 100%;
}

.loading-spinner i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}