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

    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        min-height: 100vh;
        padding: 20px;
    }

    .container {
        max-width: 1200px;
        margin: 0 auto;
        background: white;
        border-radius: 15px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        overflow: hidden;
    }

    .header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 30px;
        text-align: center;
    }

    .header h1 {
        font-size: 2.5em;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }

    .controls {
        display: flex;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 20px;
    }

    .btn {
        padding: 12px 24px;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-size: 14px;
    }

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

    .btn-primary { background: #667eea; color: white; }
    .btn-success { background: #2ecc71; color: white; }
    .btn-warning { background: #f39c12; color: white; }
    .btn-danger { background: #e74c3c; color: white; }
    .btn-info { background: #3498db; color: white; }
    .btn-secondary { background: #95a5a6; color: white; }

    .navigation {
        display: flex;
        background: #f8f9fa;
        border-bottom: 2px solid #e9ecef;
        overflow-x: auto;
    }

    .nav-btn {
        flex: 1;
        padding: 15px;
        background: none;
        border: none;
        cursor: pointer;
        font-weight: bold;
        transition: all 0.3s ease;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        min-width: 120px;
    }

    .nav-btn.active {
        background: white;
        border-bottom-color: #667eea;
        color: #667eea;
    }

    .nav-btn:hover {
        background: #e9ecef;
    }

    .content {
        padding: 30px;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
    }

    .character-info {
        background: linear-gradient(135deg, #667eea20, #764ba220);
        border-radius: 12px;
        padding: 25px;
        margin-bottom: 25px;
        border: 2px solid #667eea30;
    }

    .character-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 20px;
    }

    .character-name {
        font-size: 2em;
        font-weight: bold;
        color: #2c3e50;
        margin-bottom: 5px;
    }

    .character-details {
        color: #7f8c8d;
        font-size: 1.1em;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin: 25px 0;
    }

    .stat-card {
        background: white;
        border: 2px solid #667eea30;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .stat-card h3 {
        color: #2c3e50;
        margin-bottom: 15px;
        font-size: 1.2em;
    }

    .stat-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 10px 0;
    }

    .stat-value {
        font-weight: bold;
        font-size: 1.1em;
    }

    .level-display {
        font-size: 2em;
        color: #667eea;
    }

    .health-bar, .mana-bar {
        width: 100%;
        height: 8px;
        border-radius: 4px;
        margin: 5px 0;
        overflow: hidden;
    }

    .health-bar {
        background: #ffebee;
    }

    .mana-bar {
        background: #e3f2fd;
    }

    .health-fill {
        height: 100%;
        background: linear-gradient(90deg, #ff5722, #ff9800);
        transition: width 0.3s ease;
    }

    .mana-fill {
        height: 100%;
        background: linear-gradient(90deg, #2196f3, #03a9f4);
        transition: width 0.3s ease;
    }

    .point-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .use-point-btn {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 8px;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .use-point-btn:disabled {
        background: #bdc3c7;
        cursor: not-allowed;
        opacity: 0.6;
    }

    .btn:disabled {
        background-color: #bdc3c7;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
        opacity: 0.7;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }

    .use-pv-btn {
        background: linear-gradient(135deg, #ff5722, #ff9800);
        color: white;
    }

    .use-pm-btn {
        background: linear-gradient(135deg, #2196f3, #03a9f4);
        color: white;
    }

    .materia-card {
        background: white;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }

    .materia-card:hover {
        transform: translateY(-2px);
    }

    .materia-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .materia-name {
        font-size: 1.3em;
        font-weight: bold;
        color: #2c3e50;
    }

    .materia-actions {
        display: flex;
        gap: 10px;
    }

    .progress-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }

    .progress-item {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
    }

    .progress-label {
        font-weight: bold;
        margin-bottom: 10px;
        color: #2c3e50;
    }

    .progress-bar {
        width: 100%;
        height: 20px;
        background: #e9ecef;
        border-radius: 10px;
        overflow: hidden;
        margin-bottom: 5px;
    }

    .progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #667eea, #764ba2);
        transition: width 0.3s ease;
    }

    .progress-text {
        text-align: center;
        font-size: 0.9em;
        color: #666;
    }

    .todo-group {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .todo-group h4 {
        color: #2c3e50;
        margin-bottom: 10px;
        font-size: 1em;
    }

    .todo-item {
        display: flex;
        align-items: center;
        justify-content: between;
        background: white;
        border-radius: 6px;
        padding: 10px;
        margin-bottom: 8px;
        border: 1px solid #dee2e6;
    }

    .todo-item-content {
        display: flex;
        align-items: center;
        flex-grow: 1;
    }

    .todo-checkbox {
        margin-right: 10px;
        width: 18px;
        height: 18px;
    }

    .todo-text {
        flex-grow: 1;
        margin-right: 10px;
    }

    .todo-text.done {
        text-decoration: line-through;
        color: #999;
    }

    .todo-review {
        margin-left: 10px;
    }

    .todo-review-label {
        font-size: 0.8em;
        margin-right: 5px;
        color: #666;
    }

    .todo-review-checkbox {
        width: 16px;
        height: 16px;
    }

    .delete-btn {
        background: none;
        border: none;
        color: #e74c3c;
        cursor: pointer;
        font-size: 18px;
        margin-left: 10px;
    }

    .delete-btn:hover {
        color: #c0392b;
    }

    .add-todo {
        display: flex;
        gap: 10px;
        margin-top: 10px;
    }

    .add-todo input {
        flex-grow: 1;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

    .todo-notes {
        width: 100%;
        height: 60px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-top: 10px;
        resize: vertical;
        font-family: inherit;
        font-size: 0.9em;
    }

    .questoes-section {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-top: 20px;
    }

    .questoes-input {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 15px;
    }

    .questoes-input input {
        width: 80px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-align: center;
    }

    .questoes-history {
        max-height: 120px;
        overflow-y: auto;
    }

    .questao-item {
        background: white;
        border-radius: 4px;
        padding: 8px;
        margin-bottom: 5px;
        font-size: 0.9em;
        border: 1px solid #dee2e6;
    }

    .input-group {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 15px;
    }

    .input-group label {
        font-weight: bold;
        flex-basis: 200px;
    }

    .input-group input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

    .add-materia {
        text-align: center;
        margin-bottom: 30px;
    }

    .empty-state {
        text-align: center;
        padding: 50px;
        color: #7f8c8d;
        font-size: 1.1em;
    }

    .resumo-materias {
        background: white;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        padding: 20px;
        margin-top: 25px;
    }

    .resumo-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        margin: 8px 0;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .resumo-stats {
        display: flex;
        gap: 20px;
        font-size: 0.9em;
        color: #666;
    }

    .hidden {
        display: none !important;
    }

    #fileInput {
        display: none;
    }

    .edit-form {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        margin: 20px 0;
    }

    .edit-form input {
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

    .edit-actions {
        display: flex;
        gap: 10px;
        margin-top: 15px;
    }

    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .modal-content {
        background: white;
        border-radius: 12px;
        padding: 30px;
        max-width: 90%;
        max-height: 90%;
        overflow-y: auto;
        position: relative;
    }

    .close-modal {
        position: absolute;
        top: 15px;
        right: 20px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #999;
    }

    .close-modal:hover {
        color: #666;
    }

    /* Estilos específicos para missões */
    .missions-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .mission-card {
        background: rgba(0,0,0,0.05);
        padding: 15px;
        border-radius: 10px;
        border: 2px solid #e9ecef;
        cursor: pointer;
        transition: all 0.3s;
    }

    .mission-card:hover {
        border-color: #667eea;
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .mission-card.completed {
        border-color: #27ae60;
        background: rgba(39,174,96,0.1);
    }

    .mission-name {
        font-weight: bold;
        color: #2c3e50;
        margin-bottom: 10px;
    }

    .mission-reward {
        color: #f39c12;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .mission-description {
        color: #7f8c8d;
        font-size: 0.9em;
        margin-bottom: 15px;
    }

    /* Estilos específicos para loja */
    .shop-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }

    .shop-item {
        background: #f8f9fa;
        padding: 20px;
        border-radius: 10px;
        border: 2px solid #e9ecef;
        text-align: center;
        transition: all 0.3s;
        display: flex;
        flex-direction: column;
    }

    .shop-item:hover {
        border-color: #667eea;
        transform: translateY(-5px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .shop-item-content {
        flex-grow: 1;
    }

    .shop-item-icon {
        font-size: 3em;
        margin-bottom: 10px;
    }

    .shop-item-name {
        color: #2c3e50;
        font-weight: bold;
        margin-bottom: 10px;
    }

    .shop-item-price {
        color: #f39c12;
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .shop-item-description {
        color: #7f8c8d;
        font-size: 0.9em;
        margin-bottom: 15px;
        flex-grow: 1;
    }

    .shop-item-actions {
        margin-top: auto;
        display: flex;
        gap: 8px;
        justify-content: center;
    }

    /* Estilos específicos para conquistas */
    .achievement-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        margin-top: 20px;
    }

    .unlocked-achievement-item {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1.1em;
        background: #f8f9fa;
        padding: 8px 12px;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .unlocked-achievement-item span:first-child {
        font-size: 1.5em;
    }

    .achievement {
        background: rgba(0,0,0,0.05);
        padding: 15px;
        border-radius: 10px;
        border: 2px solid #e9ecef;
        text-align: center;
        transition: all 0.3s;
    }

    .achievement.unlocked {
        border-color: #667eea;
        background: rgba(102,126,234,0.1);
        animation: unlock 0.5s;
    }

    @keyframes unlock {
        0% { transform: scale(0.8) rotate(0deg); }
        50% { transform: scale(1.1) rotate(5deg); }
        100% { transform: scale(1) rotate(0deg); }
    }

    .achievement-icon {
        font-size: 2em;
        margin-bottom: 10px;
    }

    .achievement-name {
        font-weight: bold;
        color: #2c3e50;
        margin-bottom: 5px;
        font-size: 0.9em;
    }

    .achievement-description {
        color: #7f8c8d;
        font-size: 0.8em;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        display: block;
        margin-bottom: 5px;
        color: #2c3e50;
        font-weight: bold;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 1em;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: #667eea;
        box-shadow: 0 0 5px rgba(102,126,234,0.3);
    }

    .config-section {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        padding: 25px;
        margin-bottom: 30px;
    }
    .config-section h3 {
        color: #2c3e50;
        margin-bottom: 20px;
    }
    .config-section .btn {
        margin-top: 10px;
    }

    .ouro-historico {
        max-height: 300px;
        overflow-y: auto;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 10px;
    }
    .historico-item {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        border-bottom: 1px solid #eee;
    }
    .historico-item:last-child {
        border-bottom: none;
    }
    .historico-item .valor-ganho { color: #27ae60; font-weight: bold; }
    .historico-item .valor-gasto { color: #c0392b; font-weight: bold; }
    .historico-item .valor-edicao { color: #2980b9; font-weight: bold; }
    .historico-item .data { font-size: 0.8em; color: #7f8c8d; }

    /* Estilos da Aba Campanhas */
    .campaign-controls {
        display: flex;
        gap: 15px;
        margin-bottom: 25px;
        flex-wrap: wrap;
    }

    .campaign-card, .dungeon-card, .mission-card {
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 15px;
        transition: all 0.3s ease;
    }

    .campaign-card {
        background: rgba(102, 126, 234, 0.1);
        border: 2px solid rgba(102, 126, 234, 0.3);
    }

    .dungeon-card {
        background: rgba(118, 75, 162, 0.1);
        border: 2px solid rgba(118, 75, 162, 0.2);
        margin-left: 20px;
    }

    .mission-card {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        margin-left: 40px;
    }

    .item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

    .item-title {
        font-size: 1.4em;
        font-weight: bold;
        color: #2c3e50;
    }

    .item-title.dungeon {
        font-size: 1.2em;
        color: #5a3e7b;
    }

    .item-title.mission {
        font-size: 1em;
        font-weight: normal;
        color: #34495e;
    }

    .item-actions {
        display: flex;
        gap: 8px;
    }

    .item-body {
        font-size: 0.95em;
        color: #7f8c8d;
    }

    .item-reward {
        color: #f39c12;
        font-weight: bold;
        margin: 10px 0;
    }

    .completed {
        opacity: 0.6;
        border-style: dashed;
    }

    .completed .item-title {
        text-decoration: line-through;
    }

    .notification {
        position: fixed;
        top: 20px;
        right: 20px;
        background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
        color: white;
        padding: 15px 20px;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        z-index: 2000;
        animation: slideIn 0.3s ease;
    }

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

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

    @media (max-width: 768px) {
        .stats-grid {
            grid-template-columns: 1fr;
        }
        
        .btn {
            width: 100%;
            max-width: 300px;
        }

        .progress-section {
            grid-template-columns: 1fr;
        }

        .navigation {
            flex-wrap: wrap;
        }

        .nav-btn {
            flex: none;
            min-width: 100px;
        }
    }

    .bonus-bar {
        width: 100%;
        height: 8px;
        border-radius: 4px;
        margin: 5px 0;
        overflow: hidden;
        background: #f2e3fd;
    }

    .bonus-fill {
        height: 100%;
        background: linear-gradient(90deg, #9b59b6, #8e44ad);
        transition: width 0.3s ease;
    }

    .use-pb-btn {
        background: linear-gradient(135deg, #9b59b6, #8e44ad);
        color: white;
    }