/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Onboarding Styles */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.onboarding-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 30px;
}

.onboarding-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.onboarding-header p {
    color: #718096;
    font-size: 1rem;
}

.onboarding-step {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    background: #f7fafc;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.onboarding-step.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    opacity: 1;
    transform: scale(1.02);
}

.onboarding-step h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.onboarding-step p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.onboarding-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-main h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-main h1 i {
    color: #667eea;
}

.header-main p {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 25px;
}

/* Progress Section */
.progress-section {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.progress-text {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

.progress-percentage {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

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

.header-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.action-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

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

.btn-secondary {
    background: white;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 129, 129, 0.3);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Canvas Container */
.canvas-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.canvas-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Block Styles */
.block {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

.block.priority-block {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.block.priority-block:hover {
    border-color: #5a67d8;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
}

.block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.block:hover::before {
    opacity: 1;
}

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

.block-title {
    flex: 1;
}

.block-title h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.block-title h3 i {
    color: #667eea;
    font-size: 1.2rem;
}

.priority-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.block-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.completion-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: all 0.3s ease;
}

.completion-indicator.completed {
    background: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.2);
}

.completion-indicator.partial {
    background: #ed8936;
    box-shadow: 0 0 0 3px rgba(237, 137, 54, 0.2);
}

.word-count {
    font-size: 0.8rem;
    color: #a0aec0;
    font-weight: 500;
}

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

.suggest-btn, .help-btn {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.suggest-btn:hover {
    color: #f6ad55;
    background: rgba(246, 173, 85, 0.1);
}

.help-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.block-content textarea {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.block-content textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.block-content textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.suggestions-panel {
    margin-top: 15px;
    padding: 15px;
    background: rgba(246, 173, 85, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(246, 173, 85, 0.2);
    animation: slideDown 0.3s ease;
}

.suggestions-panel h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c05621;
    margin-bottom: 10px;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestion-list li {
    font-size: 0.85rem;
    color: #744210;
    padding: 5px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    padding-left: 20px;
}

.suggestion-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #f6ad55;
    font-weight: bold;
}

.suggestion-list li:hover {
    color: #c05621;
}

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

/* Templates Section */
.templates-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.templates-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.templates-section h2 i {
    color: #667eea;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.template-btn {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    text-align: left;
}

.template-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
    color: #667eea;
}

.template-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.template-btn:hover .template-icon {
    background: rgba(102, 126, 234, 0.2);
}

.template-icon i {
    font-size: 1.5rem;
    color: #667eea;
    transition: color 0.3s ease;
}

.template-btn:hover .template-icon i {
    color: #5a67d8;
}

.template-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.template-name {
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
}

.template-desc {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.4;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.modal-body {
    padding: 30px;
}

.modal-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.modal-body p {
    color: #4a5568;
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-body ul {
    color: #4a5568;
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 8px;
}

/* Shortcuts Modal */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.shortcut-category h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.shortcut-item kbd {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    min-width: 30px;
    text-align: center;
}

.shortcut-item span {
    color: #4a5568;
    font-size: 0.9rem;
}

/* Share Modal */
.share-options {
    display: grid;
    gap: 25px;
}

.share-option {
    padding: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.share-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.share-option h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.share-option p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.copy-link-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.copy-link-container input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #f7fafc;
}

.copy-link-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* Export Options Modal */
.export-options {
    display: grid;
    gap: 25px;
}

.export-option {
    padding: 25px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    background: white;
}

.export-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.export-option h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.export-option p {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.export-option .btn {
    width: 100%;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-main h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .action-group {
        justify-content: center;
    }
    
    .progress-section {
        padding: 15px;
    }
    
    .canvas-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .canvas-container {
        padding: 20px;
    }
    
    .block {
        padding: 15px;
    }
    
    .block-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .block-actions {
        align-self: flex-end;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .template-btn {
        padding: 20px 15px;
    }
    
    .templates-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header, .modal-body {
        padding: 20px;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .share-options {
        gap: 20px;
    }
    
    .copy-link-container {
        flex-direction: column;
    }
    
    .onboarding-content {
        padding: 30px 20px;
    }
    
    .onboarding-step {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .header-main h1 {
        font-size: 1.8rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .block-title h3 {
        font-size: 1rem;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .template-btn {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .template-icon {
        width: 40px;
        height: 40px;
    }
    
    .template-icon i {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        margin: 5% auto;
        width: 98%;
    }
    
    .onboarding-content {
        padding: 20px 15px;
    }
    
    .onboarding-footer {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .header-actions,
    .templates-section,
    .help-btn {
        display: none;
    }
    
    .canvas-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .block {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    .block-content textarea {
        border: 1px solid #ccc;
        background: white;
    }
}
