/* Modern Signal Analysis Tool Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
    backdrop-filter: blur(10px);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3498db, #e74c3c, #f39c12, #27ae60);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

.input-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.textarea-container {
    flex: 1;
    min-width: 300px;
}

textarea {
    width: 100%;
    min-height: 100px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    background: #fafafa;
    color: #2c3e50;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background: #fff;
}

.settings-toggle {
    margin-bottom: 15px;
    text-align: center;
}

.settings-toggle .btn {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    border: 2px solid #7f8c8d;
    transition: all 0.3s ease;
}

.settings-toggle .btn:hover {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.controls {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    min-width: 250px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 2px solid #e0e0e0;
    margin-top: 15px;
}

.controls h4 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.settings-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    margin: 0;
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9em;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.buttons {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.buttons::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
    transform: translateY(-50%);
}

.btn {
    padding: 12px 30px;
    margin: 0 10px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.results {
    margin-top: 30px;
    position: relative;
}

sult-item {
    background: #fff;
    border-radius: 15px;
    padding: 20px;


    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 2px;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.result-item:hover::before {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
}

.canvas-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

canvas {
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.result-number {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.result-number:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.script-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border-left: 4px solid #3498db;
}

.documentation {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    position: relative;
}

.documentation::before {
    content: '📚 الدليل والمساعدة';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 20px;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.2em;
}

.doc-section {
    margin-bottom: 30px;
}

.doc-section h3 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
    position: relative;
}

.doc-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e74c3c;
    transition: width 0.3s ease;
}

.doc-section:hover h3::after {
    width: 100%;
}

.doc-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    line-height: 1.8;
    color: #2c3e50;
    border-left: 4px solid #e74c3c;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .input-section {
        flex-direction: column;
    }
    
    .controls {
        min-width: auto;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .btn {
        margin: 5px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    textarea {
        font-size: 14px;
        padding: 15px;
    }
    
    .control-group label {
        font-size: 0.8em;
    }
    
    .control-group input,
    .control-group select {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-item {
    animation: fadeIn 0.5s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 