/* ============================================
   ESTILOS PRINCIPAIS - XNOTAS (CORRIGIDO)
   ============================================ */

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    flex-wrap: nowrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo i {
    font-size: 1.8rem;
}

.logo span {
    text-transform: lowercase;
}

.menu {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.btn-menu {
    color: white;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-menu:hover {
    background: white;
    color: #764ba2;
}

.btn-menu.btn-primary {
    background: #ffd700;
    color: #333;
}

.btn-menu.btn-primary:hover {
    background: #ffed4a;
}

/* ============================================
   BANNER PRO
   ============================================ */
.banner-pro {
    background: linear-gradient(90deg, #ffd700, #ffa500);
    padding: 0.8rem 1.5rem;
    margin: 0.8rem 2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    font-weight: 500;
    gap: 1rem;
}

.crown-icon {
    font-size: 1.8rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.banner-content span {
    flex: 1;
    text-align: center;
    font-size: 1rem;
}

.banner-content span strong {
    color: #000;
}

.btn-assinar {
    background: #333;
    color: #ffd700;
    padding: 8px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-assinar:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.container {
    max-width: 1200px;
    margin: 1.5rem auto;
    padding: 0 2rem;
}

.addNote-content {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 1.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.addNote-content:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.7);
}

.icon-plus {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 0.3rem;
}

.icon-plus i {
    font-size: 2.8rem;
    color: white;
}

.addNote-content span {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
    display: block;
}

.addNote-content span:last-child {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
    margin-top: 0.2rem;
}

/* ============================================
   NOTAS
   ============================================ */
.content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.item {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    animation: fadeIn 0.5s ease;
    min-height: 200px;
}

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

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ff4444;
    transition: all 0.3s;
    z-index: 10;
    border: none;
}

.remove:hover {
    background: #ff4444;
    color: white;
    transform: rotate(90deg);
}

.remove i {
    font-size: 1rem;
}

.item textarea {
    width: 100%;
    min-height: 150px;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    color: #333;
}

.item textarea::placeholder {
    color: rgba(0,0,0,0.3);
}

/* ============================================
   EMPTY NOTES
   ============================================ */
.empty-notes {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: white;
}

.empty-notes i {
    font-size: 3.5rem;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.empty-notes p {
    font-size: 1.1rem;
}

.empty-notes p:last-child {
    opacity: 0.7;
    font-size: 0.95rem;
    margin-top: 0.3rem;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 1rem 2rem;
    border-radius: 12px;
    color: white;
    display: none;
    z-index: 99999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    max-width: 400px;
    animation: slideInRight 0.4s ease;
}

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

.toast.show {
    display: block;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #17a2b8;
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 2.5rem;
    border-radius: 24px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: slideInModal 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideInModal {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-content .close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    background: none;
    border: none;
    line-height: 1;
}

.modal-content .close:hover {
    color: #333;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #764ba2;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content h2 i {
    color: #667eea;
}

.modal-content .form-group {
    margin-bottom: 1.2rem;
}

.modal-content .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.modal-content .form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
    font-size: 0.95rem;
    background: #f8f9fa;
}

.modal-content .form-group input:focus {
    border-color: #667eea;
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.modal-content .btn-primary {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    margin-top: 0.5rem;
}

.modal-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.modal-footer {
    text-align: center;
    margin-top: 1.2rem;
    color: #666;
    font-size: 0.9rem;
}

.modal-footer a {
    color: #764ba2;
    text-decoration: none;
    font-weight: 600;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ============================================
   RESPONSIVIDADE - SMARTPHONES (CORRIGIDO)
   ============================================ */

/* Tablets e celulares grandes */
@media (max-width: 1024px) {
    .content {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .header {
        padding: 0.8rem 1.5rem;
    }
    
    .btn-menu {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
}

/* Celulares - TELA PRINCIPAL */
@media (max-width: 768px) {
    /* HEADER - mantém horizontal */
    .header {
        flex-direction: row;
        padding: 0.7rem 1rem;
        gap: 0.8rem;
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .logo {
        font-size: 1.3rem;
        flex-shrink: 0;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .menu {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .btn-menu {
        font-size: 0.8rem;
        padding: 6px 12px;
        gap: 5px;
        white-space: nowrap;
    }
    
    .btn-menu i {
        font-size: 0.8rem;
    }
    
    /* BANNER PRO */
    .banner-pro {
        margin: 0.6rem 1rem;
        padding: 0.6rem 1rem;
        border-radius: 30px;
    }
    
    .banner-content {
        gap: 0.6rem;
        flex-wrap: nowrap;
    }
    
    .banner-content span {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .crown-icon {
        font-size: 1.4rem;
        flex-shrink: 0;
    }
    
    .btn-assinar {
        font-size: 0.8rem;
        padding: 6px 16px;
        flex-shrink: 0;
    }
    
    .btn-assinar i {
        font-size: 0.8rem;
    }
    
    /* CONTAINER */
    .container {
        padding: 0 1rem;
        margin: 1rem auto;
    }
    
    /* BOTÃO ADICIONAR NOTA */
    .addNote-content {
        padding: 1.2rem 1rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }
    
    .icon-plus {
        font-size: 2.2rem;
    }
    
    .icon-plus i {
        font-size: 2.2rem;
    }
    
    .addNote-content span {
        font-size: 1rem;
    }
    
    .addNote-content span:last-child {
        font-size: 0.8rem;
    }
    
    /* NOTAS */
    .content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .item {
        padding: 1.2rem;
        border-radius: 16px;
        min-height: 160px;
    }
    
    .item textarea {
        min-height: 120px;
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .remove {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
    
    .remove i {
        font-size: 1.1rem;
    }
    
    /* EMPTY NOTES */
    .empty-notes {
        padding: 2rem 1rem;
    }
    
    .empty-notes i {
        font-size: 3rem;
    }
    
    .empty-notes p {
        font-size: 1rem;
    }
    
    .empty-notes p:last-child {
        font-size: 0.9rem;
    }
    
    /* MODAL */
    .modal-content {
        padding: 1.8rem;
        max-width: 95%;
        border-radius: 20px;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-content .form-group input {
        font-size: 0.95rem;
        padding: 0.7rem 0.9rem;
    }
    
    .modal-content .btn-primary {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
    
    /* TOAST */
    .toast {
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: none;
        font-size: 0.9rem;
        padding: 0.8rem 1.2rem;
        border-radius: 10px;
    }
}

/* Celulares muito pequenos */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.8rem;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo i {
        font-size: 1.2rem;
    }
    
    .btn-menu {
        font-size: 0.7rem;
        padding: 5px 10px;
        gap: 4px;
    }
    
    .btn-menu i {
        font-size: 0.7rem;
    }
    
    .banner-pro {
        margin: 0.4rem 0.5rem;
        padding: 0.4rem 0.8rem;
        border-radius: 20px;
    }
    
    .banner-content span {
        font-size: 0.75rem;
    }
    
    .crown-icon {
        font-size: 1.2rem;
    }
    
    .btn-assinar {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    
    .btn-assinar i {
        font-size: 0.7rem;
    }
    
    .container {
        padding: 0 0.6rem;
        margin: 0.8rem auto;
    }
    
    .addNote-content {
        padding: 1rem 0.8rem;
        border-radius: 14px;
    }
    
    .icon-plus {
        font-size: 1.8rem;
    }
    
    .icon-plus i {
        font-size: 1.8rem;
    }
    
    .addNote-content span {
        font-size: 0.9rem;
    }
    
    .addNote-content span:last-child {
        font-size: 0.7rem;
    }
    
    .content {
        gap: 0.8rem;
    }
    
    .item {
        padding: 1rem;
        border-radius: 14px;
        min-height: 140px;
    }
    
    .item textarea {
        min-height: 100px;
        font-size: 0.95rem;
    }
    
    .remove {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }
    
    .remove i {
        font-size: 0.9rem;
    }
    
    .empty-notes p {
        font-size: 0.9rem;
    }
    
    .empty-notes p:last-child {
        font-size: 0.8rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .modal-content h2 {
        font-size: 1.1rem;
    }
    
    .modal-content .form-group input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .modal-content .btn-primary {
        font-size: 0.9rem;
        padding: 0.7rem;
    }
    
    .modal-footer {
        font-size: 0.8rem;
    }
}

/* ============================================
   AJUSTE PARA BANNERS
   ============================================ */
/* Centraliza e ajusta banners */
.banner-topo {
    text-align: center;
    margin: 0.5rem auto;
    max-width: 100%;
    overflow: hidden;
}

.banner-topo iframe,
.banner-topo img,
.banner-topo ins {
    max-width: 100%;
    height: 90px;
}

.banner-rodape {
    text-align: center;
    margin: 1rem auto;
    max-width: 100%;
    overflow: hidden;
}

.banner-rodape iframe,
.banner-rodape img,
.banner-rodape ins {
    max-width: 100%;
    height: 60px;
}

/* Ajuste para smartphones - banners */
@media (max-width: 768px) {
    .banner-topo {
        margin: 0.3rem auto;
        padding: 0 0.5rem;
    }
    
    .banner-rodape {
        margin: 0.5rem auto;
        padding: 0 0.5rem;
    }
    
    /* Força banners a ficarem centralizados e responsivos */
    .banner-topo iframe,
    .banner-topo img,
    .banner-topo ins,
    .banner-rodape iframe,
    .banner-rodape img,
    .banner-rodape ins {
        max-width: 100% !important;
        height: 60px !important;
        display: inline-block;
    }
}