/* Triangle Angle Sum Plugin Styles */
.triangle-angle-sum-container {
    font-family: 'Arial', sans-serif;
    margin: 20px 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 70vh;
    display: flex;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.tas-sidebar {
    width: 350px;
    background: white;
    padding: 30px;
    box-shadow: 5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
    position: relative;
}

.tas-main-content {
    flex: 1;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tas-canvas-container {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.tas-sidebar h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 1.9em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 0;
}

.tas-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.tas-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 5px solid #007bff;
}

.tas-instructions h3 {
    margin-top: 0;
    color: #007bff;
}

.tas-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.tas-instructions li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.tas-angle-display {
    margin: 20px 0;
}

.tas-btn {
    padding: 15px 24px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    color: white;
}

.tas-btn-check {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.tas-btn-cut {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.tas-btn-arrange {
    background: linear-gradient(45deg, #FF9800, #F57C00);
}

.tas-btn-reset {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

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

.tas-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tas-canvas-container canvas {
    border: 3px solid #333;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: crosshair;
    display: block;
}

.tas-angle-info {
    background: white;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 5px 0;
}

.tas-angle-a { 
    border-left: 5px solid red; 
}

.tas-angle-b { 
    border-left: 5px solid green; 
}

.tas-angle-c { 
    border-left: 5px solid blue; 
}

/* Responsive Design */
@media (max-width: 768px) {
    .triangle-angle-sum-container {
        flex-direction: column;
        min-height: auto;
    }
    
    .tas-sidebar {
        width: 100%;
        padding: 20px;
    }
    
    .tas-main-content {
        padding: 20px;
    }
    
    .tas-canvas-container canvas {
        max-width: 100%;
        height: auto;
    }
    
    .tas-sidebar h1 {
        font-size: 1.8em;
    }
    
    .tas-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tas-sidebar {
        padding: 15px;
    }
    
    .tas-main-content {
        padding: 15px;
    }
    
    .tas-canvas-container {
        padding: 15px;
    }
    
    .tas-instructions {
        padding: 15px;
    }
    
    .tas-sidebar h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
    }
}

/* WordPress Admin Styles */
.wrap .triangle-angle-sum-container {
    margin-top: 20px;
}

/* Color picker in admin */
.wp-admin .color-picker {
    width: 100px;
}

/* Admin form styles */
.wrap .form-table th {
    width: 200px;
}

.wrap code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: Monaco, Consolas, monospace;
}

/* Loading animation */
.tas-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Accessibility improvements */
.tas-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.tas-canvas-container canvas:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .triangle-angle-sum-container {
        background: #000;
        color: #fff;
    }
    
    .tas-sidebar {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .tas-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .tas-btn {
        transition: none;
    }
    
    .tas-btn:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .triangle-angle-sum-container {
        background: white !important;
        box-shadow: none !important;
    }
    
    .tas-sidebar {
        box-shadow: none !important;
    }
    
    .tas-btn {
        display: none;
    }
}