* {
    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;
    color: #333;
    background: #f5f5f5;
    padding-top: 70px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 100;
}

.header h1 a {
    color: #333;
    text-decoration: none;
}

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

.header-actions a {
    color: #666;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.header-actions a:hover {
    background: #f0f0f0;
}

.button-link {
    background: transparent;
    border: none;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: inherit;
    transition: background 0.2s;
}

.button-link:hover {
    background: #f0f0f0;
}

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

.card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

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

.label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: #3b82f6;
}

.button {
    background: #3b82f6;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.button:hover {
    background: #2563eb;
}

.button.secondary {
    background: #6b7280;
}

.button.secondary:hover {
    background: #4b5563;
}

.button.danger {
    background: #ef4444;
}

.button.danger:hover {
    background: #dc2626;
}

.button-icon {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.token-display {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
}

.token-display h3 {
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.token-display .warning {
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 1rem;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.todo-app-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.todo-app-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.todo-app-card h3 {
    margin-bottom: 0.5rem;
}

.todo-app-card h3 a {
    color: #333;
    text-decoration: none;
}

.todo-app-card .meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.app-header {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.app-info {
    margin-bottom: 1rem;
}

.app-info h2 {
    margin-bottom: 0.5rem;
}

.presence {
    color: #10b981;
    font-size: 0.875rem;
}

.meta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.todo-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.todo-item {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.todo-content {
    flex: 1;
}

.todo-content h4 {
    margin-bottom: 0.25rem;
}

.todo-content h4.completed {
    text-decoration: line-through;
    color: #9ca3af;
}

.todo-content p {
    color: #6b7280;
    font-size: 0.875rem;
}

.add-item-form {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.add-item-form .input {
    flex: 1;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

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

.button-secondary {
    background: #6b7280;
}

.button-secondary:hover {
    background: #4b5563;
}

.error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.hint {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.hint a {
    color: #3b82f6;
    text-decoration: none;
}

.danger-zone {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.danger-zone h3 {
    color: #ef4444;
    margin-bottom: 1rem;
}
