/* スピログラフプラグイン - 統一＆マージ済みCSS */

.spirograph-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.spirograph-controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.spirograph-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.control-item.number-input,
.control-item.horizontal {
    padding: 10px 6px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.control-item.number-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 75px;
}
.control-item.horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 45px;
}

.control-item.number-input:hover,
.control-item.horizontal:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
}

.control-item.number-input label,
.control-item.horizontal label {
    font-size: 12px;
    font-weight: 700;
    color: #495057;
    line-height: 1.2;
    letter-spacing: 0.3px;
    width: 100%;
    text-align: center;
    margin-bottom: 6px;
    white-space: nowrap;
}

.control-item.horizontal label {
    flex: 1;
    margin-bottom: 0;
    text-align: left;
    margin-right: 8px;
}

.control-item.number-input input,
.control-item.horizontal input,
.control-item.number-input select,
.control-item.horizontal select {
    width: 55px;
    height: 30px;
    padding: 4px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    background: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.control-item.number-input select,
.control-item.horizontal select {
    appearance: none;
    padding-right: 18px;
    line-height: 1.2;
}

.control-item.number-input input:focus,
.control-item.horizontal input:focus,
.control-item.number-input select:focus,
.control-item.horizontal select:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 6px rgba(74, 144, 226, 0.3);
    transform: scale(1.02);
}

.control-item.horizontal select option,
.control-item.number-input select option {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.spirograph-color {
    width: 40px !important;
    height: 30px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    cursor: pointer;
    box-sizing: border-box !important;
    border: 2px solid #ced4da !important;
}

.spirograph-color:hover {
    border-color: #4a90e2 !important;
    transform: scale(1.02);
}

.spirograph-show {
    width: 20px !important;
    height: 20px !important;
    accent-color: #4a90e2;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.spirograph-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.spirograph-buttons button {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
    min-width: 85px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #357abd, #2c5aa0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}
.btn-primary:active,
.btn-danger:active {
    transform: translateY(0);
}

.spirograph-canvas-wrapper {
    text-align: center;
    padding: 10px;
}

.spirograph-canvas {
    border: 3px solid #4a90e2;
    border-radius: 12px;
    background: white;
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
    transition: all 0.3s ease;
}
.spirograph-canvas:hover {
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.3);
}