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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 14px;
}

.toolbar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.toolbar-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.toolbar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.toolbar-section h3 {
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 16px;
}

.field-btn {
    background: #ecf0f1;
    border: none;
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.field-btn.active {
    background: #3498db;
    color: white;
}

.objects, .lines, .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.object, .line-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.object:hover, .line-option:hover {
    background-color: #f8f9fa;
}

.player-a, .player-b, .ball, .cone, .goal {
    width: 30px;
    height: 30px;
    margin-bottom: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.player-a {
    background-color: #3498db;
    color: white;
    border: 2px solid #2980b9;
}

.player-b {
    background-color: #e74c3c;
    color: white;
    border: 2px solid #c0392b;
}

.ball {
    background-color: #f1c40f;
    border: 2px solid #f39c12;
}

.cone {
    background-color: #f39c12;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.goal {
    background-color: transparent;
    border: 2px solid #27ae60;
    border-radius: 0;
}

.pass-line, .movement-line, .dribble-line {
    width: 40px;
    height: 20px;
    margin-bottom: 5px;
}

.pass-line {
    border-bottom: 2px solid #3498db;
    position: relative;
}

.pass-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid #3498db;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.movement-line {
    border-bottom: 2px dashed #9b59b6;
}

.dribble-line {
    position: relative;
    border-bottom: 2px solid transparent;
}

.dribble-line::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    border-bottom: 2px solid #e67e22;
    border-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='4'><path d='M0 2 Q 5 0 10 2 T 20 2 T 30 2 T 40 2 T 50 2 T 60 2 T 70 2 T 80 2 T 90 2 T 100 2' stroke='%23e67e22' fill='none'/></svg>") 0 0 2 0 stretch;
}

.main-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 500px;
}

#field-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border: 2px solid #2c3e50;
    border-radius: 4px;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.exercise-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

#step-indicator {
    background: #ecf0f1;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}

.notification.show {
    opacity: 1;
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

.save-form, .load-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.save-form input, .load-form select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.save-form button, .load-form button {
    align-self: flex-start;
}

.exercise-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.exercise-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.exercise-item button {
    padding: 5px 10px;
    font-size: 12px;
}

.share-content {
    text-align: center;
}

.share-content input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
    font-size: 14px;
}

.share-content button {
    align-self: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .toolbar {
        padding: 15px;
    }
    
    .objects, .lines, .actions {
        gap: 5px;
    }
    
    .object, .line-option {
        padding: 5px;
        font-size: 12px;
    }
    
    .player-a, .player-b, .ball, .cone, .goal {
        width: 25px;
        height: 25px;
        font-size: 10px;
    }
    
    .pass-line, .movement-line, .dribble-line {
        width: 30px;
        height: 15px;
    }
    
    #field-container {
        height: 400px;
    }
}